class DatabaseTransactionRecord

Properties

string $connection

The name of the database connection.

int $level

The transaction level.

DatabaseTransactionRecord|null $parent

The parent instance of this transaction.

protected callable[] $callbacks

The callbacks that should be executed after committing.

protected callable[] $callbacksForRollback

The callbacks that should be executed after rollback.

Methods

__construct(string $connection, int $level, DatabaseTransactionRecord|null $parent = null)

Create a new database transaction record instance.

void
addCallback(callable $callback)

Register a callback to be executed after committing.

void
addCallbackForRollback(callable $callback)

Register a callback to be executed after rollback.

void
executeCallbacks()

Execute all of the callbacks.

void
executeCallbacksForRollback()

Execute all of the callbacks for rollback.

array
getCallbacks()

Get all of the callbacks.

array
getCallbacksForRollback()

Get all of the callbacks for rollback.

Details

at line 43
__construct(string $connection, int $level, DatabaseTransactionRecord|null $parent = null)

Create a new database transaction record instance.

Parameters

string $connection
int $level
DatabaseTransactionRecord|null $parent

at line 53
void addCallback(callable $callback)

Register a callback to be executed after committing.

Parameters

callable $callback

Return Value

void

at line 61
void addCallbackForRollback(callable $callback)

Register a callback to be executed after rollback.

Parameters

callable $callback

Return Value

void

at line 69
void executeCallbacks()

Execute all of the callbacks.

Return Value

void

at line 79
void executeCallbacksForRollback()

Execute all of the callbacks for rollback.

Return Value

void

at line 101
array getCallbacks()

Get all of the callbacks.

Return Value

array

at line 111
array getCallbacksForRollback()

Get all of the callbacks for rollback.

Return Value

array