AutowireCallable
extends Autowire
in package
Attribute to tell which callable to give to an argument of type Closure.
Attributes
- #[Attribute]
- \Attribute::TARGET_PARAMETER
Table of Contents
Properties
- $lazy : bool|array<string|int, mixed>
- $value : string|array<string|int, mixed>|Expression|Reference|ArgumentInterface|null
Methods
- __construct() : mixed
- Use only ONE of the following.
- buildDefinition() : Definition
Properties
$lazy read-only
public
bool|array<string|int, mixed>
$lazy
$value read-only
public
string|array<string|int, mixed>|Expression|Reference|ArgumentInterface|null
$value
Methods
__construct()
Use only ONE of the following.
public
__construct([string|array<string|int, mixed>|null $callable = null ][, string|null $service = null ][, string|null $method = null ][, bool|class-string $lazy = false ]) : mixed
Parameters
- $callable : string|array<string|int, mixed>|null = null
- $service : string|null = null
-
Service ID (ie "some.service")
- $method : string|null = null
- $lazy : bool|class-string = false
-
Whether to use lazy-loading for this argument
buildDefinition()
public
buildDefinition(mixed $value, string|null $type, ReflectionParameter $parameter) : Definition
Parameters
- $value : mixed
- $type : string|null
- $parameter : ReflectionParameter