CoolCMS API

OperationContext
in package

FinalYes

Stack of the operations running in this process plus the correlation ID of the request.

Kept apart from OperationScope and without dependencies on purpose: participants (and the Doctrine onClear listener) read it, while the scope depends on the participants, so reading the scope from a participant would close a DI cycle.

The bottom of the stack is the root operation; frames above it are joined to it (see OperationFrame::isJoined()). The stack holds only issued frames and is emptied when the root ends, so nothing carries over to the next operation.

Table of Contents

Properties

$joinCount  : int
$lastId  : int
$requestId  : string
$rootCount  : int
$stack  : array<int, OperationFrame>

Methods

__construct()  : mixed
getCurrent()  : OperationFrame|null
getJoinCount()  : int
Number of frames joined to the current (or last) root operation.
getRequestId()  : string
Correlation ID of this request (CLI: of this process); the same for all its operations.
getRoot()  : OperationFrame|null
getRootCount()  : int
Number of root operations opened so far in this request.
nextId()  : int
push()  : void
remove()  : array<int, OperationFrame>
Removes the frame (the same instance) and every frame above it.

Properties

Methods

getJoinCount()

Number of frames joined to the current (or last) root operation.

public getJoinCount() : int
Return values
int

getRequestId()

Correlation ID of this request (CLI: of this process); the same for all its operations.

public getRequestId() : string
Return values
string

getRootCount()

Number of root operations opened so far in this request.

public getRootCount() : int
Return values
int
On this page

Search results