class WorkerStateClassCollector implements Collector

Collects the classes that are worker-lifetime roots by declaration, the request or operation state their promoted constructor parameters keep, and the observers models register when they boot.

Constants

private MODEL_EVENTS

The events every model makes observable, as HasEvents::getObservableEvents() lists them.

private OBSERVER_REGISTRATION

The model methods that decide which #[ObservedBy] observers handle which events.

Methods

__construct(ReflectionProvider $reflectionProvider, WorkerStateHelper $helper, RuntimeInputs $runtimeInputs)

Create a new collector instance.

string
getNodeType()

Get the node type the collector inspects.

array|null
processNode(Node $node, Scope $scope)

Collect the class's root declarations, promoted state captures and model observers.

Details

at line 61
__construct(ReflectionProvider $reflectionProvider, WorkerStateHelper $helper, RuntimeInputs $runtimeInputs)

Create a new collector instance.

Parameters

ReflectionProvider $reflectionProvider
WorkerStateHelper $helper
RuntimeInputs $runtimeInputs

at line 71
string getNodeType()

Get the node type the collector inspects.

Return Value

string

at line 84
array|null processNode(Node $node, Scope $scope)

Collect the class's root declarations, promoted state captures and model observers.

Parameters

Node $node
Scope $scope

Return Value

array|null