Documentation

TypedReference extends Reference
in package

Represents a PHP type-hinted service reference.

Tags
author

Nicolas Grekas p@tchwork.com

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

$invalidBehavior

private mixed $invalidBehavior

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

Search results