class
Illuminate
/
Database
/
DatabaseTransactionsManager
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
DatabaseTransactionsManager
Properties
protected
$transactions Illuminate\...\Collection
All of the recorded transactions.
Default: null
protected
$callbacksShouldIgnore DatabaseTransactionRecord
The database transaction that should be ignored by callbacks.
Default: null
Methods
public
__construct ( ) : void
Create a new database transactions manager instance.
public
begin ( $connection , $level ) : void
Start a new database transaction.
Parameters
- $connection string
- $level int
public
rollback ( $connection , $level ) : void
Rollback the active database transaction.
Parameters
- $connection string
- $level int
public
commit ( $connection ) : void
Commit the active database transaction.
Parameters
- $connection string
public
addCallback ( $callback ) : void
Register a transaction callback.
Parameters
- $callback callable
public
callbacksShouldIgnore ( DatabaseTransactionRecord $transaction ) : $this
Specify that callbacks should ignore the given transaction when determining if they should be executed.
Parameters
- $transaction DatabaseTransactionRecord
public
callbackApplicableTransactions ( ) : Illuminate\...\Collection
Get the transactions that are applicable to callbacks.
public
getTransactions ( ) : Illuminate\...\Collection
Get all the transactions.