class DatabaseTransactionRecord (View source)

Properties

string $connection

The name of the database connection.

int $level

The transaction level.

DatabaseTransactionRecord $parent

The parent instance of this transaction.

protected array $callbacks

The callbacks that should be executed after committing.

protected array $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

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

Create a new database transaction record instance.

Parameters

string $connection
int $level
DatabaseTransactionRecord|null $parent

void addCallback(callable $callback)

Register a callback to be executed after committing.

Parameters

callable $callback

Return Value

void

void addCallbackForRollback(callable $callback)

Register a callback to be executed after rollback.

Parameters

callable $callback

Return Value

void

void executeCallbacks()

Execute all of the callbacks.

Return Value

void

void executeCallbacksForRollback()

Execute all of the callbacks for rollback.

Return Value

void

array getCallbacks()

Get all of the callbacks.

Return Value

array

array getCallbacksForRollback()

Get all of the callbacks for rollback.

Return Value

array