Reference

class Reference

Reference represents a service reference.

Methods

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

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

bool isStrict()

Returns true when this Reference is strict.

Details

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

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

string __toString()

Return Value

string The service identifier

int getInvalidBehavior()

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

Return Value

int

bool isStrict()

Returns true when this Reference is strict.

Return Value

bool

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/DependencyInjection/Reference.html