ManagedTransactionRule
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
Get the node type the rule checks.
Report the calls in a transaction() callback that end the managed transaction.
No description
Details
at line 94
string
getNodeType()
Get the node type the rule checks.
at line 106
array
processNode(Node $node, Scope $scope)
Report the calls in a transaction() callback that end the managed transaction.
at line 238
int|null
enterNode(Node $node)
No description