class ManagedTransactionRule implements Rule

internal  
 

Reports a transaction() callback that ends the transaction it runs in.

transaction() begins its transaction before the callback and commits or rolls it back afterwards, so a commit() or rollBack() that ends that level leaves the callback's remaining work outside the transaction, and transaction() then throws because the level is gone. The callback's top-level statements are walked in order, counting the transactions it begins itself, and the walk goes silent at anything it cannot follow. A generator callback is reported on its own: its body only runs once the generator it returns is iterated, after transaction() commits.

Traits

Constants

private CONTROL_METHODS

The lowercase names of the methods that control a connection's transactions.

Properties

bool $yields

Methods

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report the calls in a transaction() callback that end the managed transaction.

int|null
enterNode(Node $node)

No description

Details

at line 94
string getNodeType()

Get the node type the rule checks.

Return Value

string

at line 106
array processNode(Node $node, Scope $scope)

Report the calls in a transaction() callback that end the managed transaction.

Parameters

Node $node
Scope $scope

Return Value

array

at line 238
int|null enterNode(Node $node)

No description

Parameters

Node $node

Return Value

int|null