sbooker/transaction-manager

Abstraction for transaction control on an application tier.

2.1.1 2022-01-27 14:01 UTC

This package is auto-updated.

Last update: 2022-01-27 14:02:33 UTC


README

Abstraction for transaction control on an application tier.

Latest Version Software License PHP Version Total Downloads

Installation

composer require sbooker/transaction-manager

Nested transactions

Nested transactions are ignored.

Example of usage

use Sbooker\TransactionManager\TransactionHandler;
use Sbooker\TransactionManager\TransactionManager;

$transactionHandler = new class implements TransactionHandler { ... };
$transactionManager = new TransactionManager($transactionHandler);

$transactionManager->transactional(function () {
    // do something what need transaction
});

License

See LICENSE file.