TypedReference
extends Reference
in package
Represents a PHP type-hinted service reference.
Tags
Table of Contents
- $id : mixed
- $invalidBehavior : mixed
- $name : mixed
- $type : mixed
- __construct() : mixed
- __toString() : string
- getInvalidBehavior() : int
- Returns the behavior to be used when the service does not exist.
- getName() : string|null
- getType() : mixed
Properties
$id
private
mixed
$id
$invalidBehavior
private
mixed
$invalidBehavior
$name
private
mixed
$name
$type
private
mixed
$type
Methods
__construct()
public
__construct(string $id, string $type[, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE ][, string|null $name = null ]) : mixed
Parameters
- $id : string
-
The service identifier
- $type : string
-
The PHP type of the identified service
- $invalidBehavior : int = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE
-
The behavior when the service does not exist
- $name : string|null = null
-
The name of the argument targeting the service
Return values
mixed —__toString()
public
__toString() : string
Return values
string —getInvalidBehavior()
Returns the behavior to be used when the service does not exist.
public
getInvalidBehavior() : int
Return values
int —getName()
public
getName() : string|null
Return values
string|null —getType()
public
getType() : mixed