A simple transaction manager with a naive implementation.
It provides a common interface to manage transactions.
If you want to make a class transactional, implement the Transactional interface.
Two TransactionManager implementations are provided allowing you to manage multiple Transactional classes in the same logic transaction.
SimpleTransactionManageris a naive implementation preventing from beginning a transaction more than once.MultipleTransactionManagerallows you to begin the transaction more than once but only commits ifcommitis called the same number of times asbeginTransaction.
Some Transactional implementations are provided:
TransactionalQueuePublisherto publish in an AMQP queue withBurrowin a transactionDoctrineDbalTransactionManagerto deal withDoctrine DBALtransactionsDoctrineEntityManagerto deal withDoctrine ORMtransactionsTransactionalEmitterto emitEventswith thePHP Leaguelib in a transactionTransactionalCommandBusto handleCommandswith thePHP Leaguelib in a transaction
