TypedReference
extends Reference
in package
Represents a PHP type-hinted service reference.
Tags
Table of Contents
Properties
- $attributes : array<string|int, mixed>
- $name : string|null
- $type : string
Methods
- __construct() : mixed
- __toString() : string
- getAttributes() : array<string|int, mixed>
- getInvalidBehavior() : int
- Returns the behavior to be used when the service does not exist.
- getName() : string|null
- getType() : string
Properties
$attributes
private
array<string|int, mixed>
$attributes
$name
private
string|null
$name
$type
private
string
$type
Methods
__construct()
public
__construct(string $id, string $type[, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE ][, string|null $name = null ][, array<string|int, mixed> $attributes = [] ]) : 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
- $attributes : array<string|int, mixed> = []
-
The attributes to be used
__toString()
public
__toString() : string
Return values
stringgetAttributes()
public
getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>getInvalidBehavior()
Returns the behavior to be used when the service does not exist.
public
getInvalidBehavior() : int
Return values
intgetName()
public
getName() : string|null
Return values
string|nullgetType()
public
getType() : string