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

at line 31
__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

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 45
getType()

at line 50
string|null getName()

Return Value

string|null

at line 58
getRequiringClass() deprecated

deprecated since Symfony 4.1

at line 68
canBeAutoregistered() deprecated

deprecated since Symfony 4.1