Scoped transaction/savepoint.
If the instance isn't committed before it loses scope, it's rolled back. There is no rollback()
method.
In order to ensure proper destruction, the instance MUST NOT leave the scope it's created in.
Protected Properties | |
bool | $committed = false |
DB | $db |
Public Static Methods | |
magic static self | factory (DB $db) |
Public Methods | |
__construct (DB $db) | |
Begins the transaction/savepoint. More... | |
__destruct () | |
Rolls back if the instance wasn't committed. More... | |
true | commit () |
Commits the transaction/savepoint. More... | |
bool | wasCommitted () |
__destruct | ( | ) |
Rolls back if the instance wasn't committed.
true commit | ( | ) |
Commits the transaction/savepoint.
This is safe to call multiple times, it won't have any effect after the first time.
|
final |