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 44
__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 54
void addCallback(callable $callback)

Register a callback to be executed after committing.

Parameters

callable $callback

Return Value

void

at line 62
void addCallbackForRollback(callable $callback)

Register a callback to be executed after rollback.

Parameters

callable $callback

Return Value

void

at line 70
void executeCallbacks()

Execute all of the callbacks.

Return Value

void

at line 93
void executeCallbacksForRollback()

Execute all of the callbacks for rollback.

Return Value

void

at line 122
array getCallbacks()

Get all of the callbacks.

Return Value

array

at line 132
array getCallbacksForRollback()

Get all of the callbacks for rollback.

Return Value

array