trait ManagesTransactions (View source)

Shares nested transaction bookkeeping while issuing physical boundaries only for the outermost scope.

Methods

void

Disables transaction entry points for the consuming connection.

void
void
trans_strict(bool $mode = true)

Controls whether a failed transaction keeps the connection in failed status for later transaction groups.

void
bool
trans_start(bool $testMode = false)

Starts a managed transaction group, optionally forcing rollback during completion for test mode.

bool
bool

Commits a successful group or rolls it back after a recorded failure.

bool
bool

Reports whether the current transaction group has remained successful.

bool
bool

Reports whether this connection has one or more managed transaction scopes open.

bool
bool
trans_begin(bool $testMode = false)

Enters a transaction scope, issuing a physical BEGIN only for the outermost scope.

bool
bool

Leaves a transaction scope, issuing a physical commit only when the outermost scope completes.

bool
bool

Leaves a transaction scope, issuing a physical rollback only when the outermost scope completes.

bool
void

Marks the current transaction group failed so completion rolls it back.

void
void

Starts the driver's physical transaction boundary for the outermost managed scope.

void
void

Commits the driver's physical transaction boundary for the outermost managed scope.

void
void

Rolls back the driver's physical transaction boundary for the outermost managed scope.

void

Details

trans_off

void trans_off()

Disables transaction entry points for the consuming connection.

Return Value

void

trans_strict

void trans_strict(bool $mode = true)

Controls whether a failed transaction keeps the connection in failed status for later transaction groups.

Parameters

bool $mode

Return Value

void

trans_start

bool trans_start(bool $testMode = false)

Starts a managed transaction group, optionally forcing rollback during completion for test mode.

Parameters

bool $testMode

Return Value

bool

trans_complete

bool trans_complete()

Commits a successful group or rolls it back after a recorded failure.

Return Value

bool

trans_status

bool trans_status()

Reports whether the current transaction group has remained successful.

Return Value

bool

trans_active

bool trans_active()

Reports whether this connection has one or more managed transaction scopes open.

Return Value

bool

trans_begin

bool trans_begin(bool $testMode = false)

Enters a transaction scope, issuing a physical BEGIN only for the outermost scope.

Parameters

bool $testMode

Return Value

bool

trans_commit

bool trans_commit()

Leaves a transaction scope, issuing a physical commit only when the outermost scope completes.

Return Value

bool

trans_rollback

bool trans_rollback()

Leaves a transaction scope, issuing a physical rollback only when the outermost scope completes.

Return Value

bool

markTransactionFailure

protected void markTransactionFailure()

Marks the current transaction group failed so completion rolls it back.

Return Value

void

beginTransaction

abstract protected void beginTransaction()

Starts the driver's physical transaction boundary for the outermost managed scope.

Return Value

void

commitTransaction

abstract protected void commitTransaction()

Commits the driver's physical transaction boundary for the outermost managed scope.

Return Value

void

rollbackTransaction

abstract protected void rollbackTransaction()

Rolls back the driver's physical transaction boundary for the outermost managed scope.

Return Value

void