InlineServiceConfigurator
extends AbstractConfigurator
in package
Uses
ArgumentTrait, AutowireTrait, BindTrait, FactoryTrait, FileTrait, LazyTrait, ParentTrait, TagTrait
Tags
Table of Contents
- FACTORY = 'inline'
- $allowParent : mixed
- $id : mixed
- $path : mixed
- __call() : mixed
- __construct() : mixed
- arg() : $this
- Sets one argument to pass to the service constructor/factory method.
- args() : $this
- Sets the arguments to pass to the service constructor/factory method.
- autowire() : $this
- Enables/disables autowiring.
- bind() : $this
- Sets bindings.
- factory() : $this
- Sets a factory.
- file() : $this
- Sets a file to require before creating the service.
- lazy() : $this
- Sets the lazy flag of this service.
- parent() : $this
- Sets the Definition to inherit from.
- processValue() : mixed
- Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value.
- tag() : $this
- Adds a tag for this definition.
Constants
FACTORY
public
mixed
FACTORY
= 'inline'
Properties
$allowParent
private
mixed
$allowParent
= true
$id
private
mixed
$id
= '[inline]'
$path
private
mixed
$path
= null
Methods
__call()
public
__call(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed>
Return values
mixed —__construct()
public
__construct(Definition $definition) : mixed
Parameters
- $definition : Definition
Return values
mixed —arg()
Sets one argument to pass to the service constructor/factory method.
public
final arg(string|int $key, mixed $value) : $this
Parameters
- $key : string|int
- $value : mixed
Return values
$this —args()
Sets the arguments to pass to the service constructor/factory method.
public
final args(array<string|int, mixed> $arguments) : $this
Parameters
- $arguments : array<string|int, mixed>
Return values
$this —autowire()
Enables/disables autowiring.
public
final autowire([bool $autowired = true ]) : $this
Parameters
- $autowired : bool = true
Return values
$this —bind()
Sets bindings.
public
final bind(string $nameOrFqcn, mixed $valueOrRef) : $this
Bindings map $named or FQCN arguments to values that should be injected in the matching parameters (of the constructor, of methods called and of controller actions).
Parameters
- $nameOrFqcn : string
-
A parameter name with its "$" prefix, or a FQCN
- $valueOrRef : mixed
-
The value or reference to bind
Return values
$this —factory()
Sets a factory.
public
final factory(string|array<string|int, mixed> $factory) : $this
Parameters
- $factory : string|array<string|int, mixed>
-
A PHP callable reference
Return values
$this —file()
Sets a file to require before creating the service.
public
final file(string $file) : $this
Parameters
- $file : string
Return values
$this —lazy()
Sets the lazy flag of this service.
public
final lazy([bool|string $lazy = true ]) : $this
Parameters
- $lazy : bool|string = true
-
A FQCN to derivate the lazy proxy from or
true
to make it extend from the definition's class
Return values
$this —parent()
Sets the Definition to inherit from.
public
final parent(string $parent) : $this
Parameters
- $parent : string
Tags
Return values
$this —processValue()
Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value.
public
static processValue(mixed $value[, bool $allowServices = false ]) : mixed
Parameters
- $value : mixed
- $allowServices : bool = false
-
whether Definition and Reference are allowed; by default, only scalars and arrays are
Return values
mixed —the value, optionally cast to a Definition/Reference
tag()
Adds a tag for this definition.
public
final tag(string $name[, array<string|int, mixed> $attributes = [] ]) : $this
Parameters
- $name : string
- $attributes : array<string|int, mixed> = []