ManagerInterface
in
Db adapter transaction manager interface
Tags
Table of Contents
Methods
- enter() : bool
- Enter a new transaction or increase nesting level
- getTransactionDepth() : int
- Get transaction depth
- isTransaction() : bool
- Check if adapter is in the middle of an open transaction
- leave() : bool
- Leave a transaction or reduce nesting level
Methods
enter()
Enter a new transaction or increase nesting level
public
enter([callable|null $beginFunc = null ][, callable|null $savepointFunc = null ]) : bool
Parameters
- $beginFunc : callable|null = null
-
Called when a new top-level transaction must be started
- $savepointFunc : callable|null = null
-
Called when a named savepoint is created
Return values
boolgetTransactionDepth()
Get transaction depth
public
getTransactionDepth() : int
Return values
intisTransaction()
Check if adapter is in the middle of an open transaction
public
isTransaction() : bool
Return values
boolleave()
Leave a transaction or reduce nesting level
public
leave(bool $doCommit[, callable|null $commitFunc = null ][, callable|null $rollbackFunc = null ][, callable|null $savepointReleaseFunc = null ][, callable|null $savepointRollbackFunc = null ]) : bool
Parameters
- $doCommit : bool
-
If true, perform a commit. Rollback otherwise.
- $commitFunc : callable|null = null
-
Called when a top-level commit must be performed
- $rollbackFunc : callable|null = null
-
Called when a top-level rollback must be performed
- $savepointReleaseFunc : callable|null = null
-
Called when a savepoint is released (like commit)
- $savepointRollbackFunc : callable|null = null
-
Called when the transaction is rolled back to a savepoint