class TypedReference extends Reference

Represents a PHP type-hinted service reference.

Methods

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

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

string|null
getName()

No description

getRequiringClass() deprecated

No description

canBeAutoregistered() deprecated

No description

Details

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

Parameters

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

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

getType()

string|null getName()

Return Value

string|null

getRequiringClass() deprecated

deprecated since Symfony 4.1

canBeAutoregistered() deprecated

deprecated since Symfony 4.1