AbstractManager
in package
implements
ManagerInterface
AbstractYes
Db adapter transaction manager abstract class
Tags
Table of Contents
Interfaces
- ManagerInterface
- Db adapter transaction manager interface
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
abstract 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
abstract getTransactionDepth() : int
Return values
intisTransaction()
Check if adapter is in the middle of an open transaction
public
abstract isTransaction() : bool
Return values
boolleave()
Leave a transaction or reduce nesting level
public
abstract 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