DbalTransaction implements Transaction
FinalYes
Tags
Interfaces
- Transaction
Methods
- __construct() : mixed
- begin() : void
- commit() : void
- A failed commit keeps the changed level: the transaction is still open, so the rollback() that follows restores it.
- fromConnection() : self
- Since Connection::getParams() is marked as an internal method, please use this constructor with caution.
- rollback() : void
- withIsolationLevel() : self
- The previous level is restored when the transaction ends, so the user's Connection is never left changed.
Methods
__construct()
public
__construct(array<string, mixed> $connectionParams) : mixed
Parameters
- $connectionParams : array<string, mixed>
begin()
public
begin() : void
commit()
A failed commit keeps the changed level: the transaction is still open, so the rollback() that follows restores it.
public
commit() : void
fromConnection()
Since Connection::getParams() is marked as an internal method, please use this constructor with caution.
public
static fromConnection(Connection $connection) : self
Parameters
- $connection : Connection
Return values
selfrollback()
public
rollback(Throwable $cause) : void
Parameters
- $cause : Throwable
withIsolationLevel()
The previous level is restored when the transaction ends, so the user's Connection is never left changed.
public
withIsolationLevel(TransactionIsolationLevel $level) : self
Parameters
- $level : TransactionIsolationLevel