class DatabaseTransactionsManager (View source)
| protected DatabaseTransactionRecord> | $committedTransactions | All of the committed transactions. | |
| protected DatabaseTransactionRecord> | $pendingTransactions | All of the pending transactions. | |
| protected array | $currentTransaction | The current transaction. |
| void | __construct()
Create a new database transactions manager instance. | |
| void | begin(string $connection, int $level)
Start a new database transaction. | |
| array | commit(string $connection, int $levelBeingCommitted, int $newTransactionLevel)
Commit the root database transaction and execute callbacks. | |
| void | stageTransactions(string $connection, int $levelBeingCommitted)
Move relevant pending transactions to a committed state. | |
| void | rollback(string $connection, int $newTransactionLevel)
Rollback the active database transaction. | |
| void | removeAllTransactionsForConnection(string $connection)
Remove all pending, completed, and current transactions for the given connection name. | |
| void | removeCommittedTransactionsThatAreChildrenOf(DatabaseTransactionRecord $transaction)
Remove all transactions that are children of the given transaction. | |
| void | addCallback(callable $callback)
Register a transaction callback. | |
| DatabaseTransactionRecord> | callbackApplicableTransactions()
Get the transactions that are applicable to callbacks. | |
| bool | afterCommitCallbacksShouldBeExecuted(int $level)
Determine if after commit callbacks should be executed for the given transaction level. | |
| Collection | getPendingTransactions()
Get all of the pending transactions. | |
| Collection | getCommittedTransactions()
Get all of the committed transactions. |
Create a new database transactions manager instance.
Start a new database transaction.
Commit the root database transaction and execute callbacks.
Move relevant pending transactions to a committed state.
Rollback the active database transaction.
Remove all pending, completed, and current transactions for the given connection name.
Remove all transactions that are children of the given transaction.
Register a transaction callback.
Get the transactions that are applicable to callbacks.
Determine if after commit callbacks should be executed for the given transaction level.
Get all of the pending transactions.
Get all of the committed transactions.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Database/DatabaseTransactionsManager.html