class BindingCycleRule implements Rule

internal  
 

Reports a binding whose concrete class name is an alias of its own abstract.

A binding to another key resolves that key, and resolution follows its aliases, so a concrete that aliases back to the abstract resolves the binding again without end.

Traits

Constants

private METHODS

The lowercase names of the binding methods checked. The *If() variants are skipped: the booted state can't show whether a call installed its binding or found one already registered.

Properties

protected Container|null $container from  HasContainer

Methods

void
setContainer(Container $container)

Set the container used for resolution.

getContainer()

Return the current container.

mixed
resolve(string $abstract)

Resolve the given type from the container.

__construct(RuntimeInputs $runtimeInputs, WorkerStateHelper $workerStateHelper)

Create a new binding cycle rule instance.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report a binding that resolves itself.

Details

in HasContainer at line 19
void setContainer(Container $container)

Set the container used for resolution.

Parameters

Container $container

Return Value

void

in HasContainer at line 27
Container getContainer()

Return the current container.

Return Value

Container

in HasContainer at line 35
mixed resolve(string $abstract)

Resolve the given type from the container.

Parameters

string $abstract

Return Value

mixed

at line 55
__construct(RuntimeInputs $runtimeInputs, WorkerStateHelper $workerStateHelper)

Create a new binding cycle rule instance.

Parameters

RuntimeInputs $runtimeInputs
WorkerStateHelper $workerStateHelper

at line 64
string getNodeType()

Get the node type the rule checks.

Return Value

string

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

Report a binding that resolves itself.

Parameters

Node $node
Scope $scope

Return Value

array