class TypedReference extends Reference

Represents a PHP type-hinted service reference.

Methods

__construct(string $id, string $type, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)

No description

string
__toString()

No description

from Reference
int
getInvalidBehavior()

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

from Reference
getType()

No description

getRequiringClass() deprecated

No description

canBeAutoregistered() deprecated

No description

Details

at line 29
__construct(string $id, string $type, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)

Parameters

string $id
string $type The PHP type of the identified service
int $invalidBehavior

in Reference at line 33
string __toString()

Return Value

string The service identifier

in Reference at line 43
int getInvalidBehavior()

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

Return Value

int

at line 41
getType()

at line 49
getRequiringClass() deprecated

deprecated since Symfony 4.1

at line 59
canBeAutoregistered() deprecated

deprecated since Symfony 4.1