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.
SimpleTransactionManager
is a naive implementation preventing from beginning a transaction more than once.MultipleTransactionManager
allows you to begin the transaction more than once but only commits ifcommit
is called the same number of times asbeginTransaction
.
Some Transactional
implementations are provided:
TransactionalQueuePublisher
to publish in an AMQP queue withBurrow
in a transactionDoctrineDbalTransactionManager
to deal withDoctrine DBAL
transactionsDoctrineEntityManager
to deal withDoctrine ORM
transactionsTransactionalEmitter
to emitEvents
with thePHP League
lib in a transactionTransactionalCommandBus
to handleCommands
with thePHP League
lib in a transaction