Documentation

No matching pages.

API

Config

Facade

Lifecycle

Class: Tx

Full name: Azera\Facade\Tx

Thin static proxy for transactions over the SQL connection registry.

Plain static methods; no magic. Complements Db::transaction() with explicit begin/commit/rollback handles when the callback shape doesn't fit.

Public methods

begin() ·

public static function begin(string|null $role = null): void

Parameters

Name Type Default Description
$role string|null null

Return value

  • Type: void

commit() ·

public static function commit(string|null $role = null): void

Parameters

Name Type Default Description
$role string|null null

Return value

  • Type: void

rollback() ·

public static function rollback(string|null $role = null): void

Parameters

Name Type Default Description
$role string|null null

Return value

  • Type: void

level() ·

public static function level(string|null $role = null): bool

Parameters

Name Type Default Description
$role string|null null

Return value

  • Type: bool

Back to the Index