class Reference

Reference represents a service reference.

Methods

__construct(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, bool $strict = true)

Note: The $strict parameter is deprecated since version 2.8 and will be removed in 3.0.

string
__toString()

No description

int
getInvalidBehavior()

Returns the behavior to be used when the service does not exist.

bool
isStrict($triggerDeprecationError = true) deprecated

Returns true when this Reference is strict.

Details

at line 34
__construct(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, bool $strict = true)

Note: The $strict parameter is deprecated since version 2.8 and will be removed in 3.0.

Parameters

string $id The service identifier
int $invalidBehavior The behavior when the service does not exist
bool $strict Sets how this reference is validated

See also

Container

at line 44
string __toString()

Return Value

string The service identifier

at line 54
int getInvalidBehavior()

Returns the behavior to be used when the service does not exist.

Return Value

int

at line 66
bool isStrict($triggerDeprecationError = true) deprecated

deprecated since version 2.8, to be removed in 3.0.

Returns true when this Reference is strict.

Parameters

$triggerDeprecationError

Return Value

bool