Flow PHP

DbalTransaction implements Transaction

FinalYes
Tags
import-type

Params from DriverManager

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>

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
self

rollback()

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
Return values
self
On this page

Search results