AliasConfigurator
extends AbstractServiceConfigurator
in package
Uses
DeprecateTrait, PublicTrait
Tags
Table of Contents
Constants
- FACTORY = 'alias'
Properties
- $valuePreProcessor : callable
- $id : mixed
- $parent : mixed
- $defaultTags : array<string|int, mixed>
Methods
- __call() : mixed
- __construct() : mixed
- __destruct() : mixed
- __invoke() : ServiceConfigurator
- Registers a service.
- __sleep() : array<string|int, mixed>
- __wakeup() : mixed
- alias() : AliasConfigurator
- Creates an alias.
- deprecate() : $this
- Whether this definition is deprecated, that means it should not be called anymore.
- get() : ServiceConfigurator
- Gets an already defined service definition.
- load() : PrototypeConfigurator
- Registers a PSR-4 namespace using a glob pattern.
- private() : $this
- processValue() : mixed
- Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value.
- public() : $this
- remove() : ServicesConfigurator
- Removes an already defined service definition or alias.
- set() : ServiceConfigurator
- Registers a service.
- stack() : AliasConfigurator
- Registers a stack of decorator services.
Constants
FACTORY
public
mixed
FACTORY
= 'alias'
Properties
$valuePreProcessor
public
static callable
$valuePreProcessor
$id
protected
mixed
$id
$parent
protected
mixed
$parent
$defaultTags
private
array<string|int, mixed>
$defaultTags
= []
Methods
__call()
public
__call(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed>
__construct()
public
__construct(ServicesConfigurator $parent, Alias $alias) : mixed
Parameters
- $parent : ServicesConfigurator
- $alias : Alias
__destruct()
public
__destruct() : mixed
__invoke()
Registers a service.
public
final __invoke(string $id[, string $class = null ]) : ServiceConfigurator
Parameters
- $id : string
- $class : string = null
Return values
ServiceConfigurator__sleep()
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>__wakeup()
public
__wakeup() : mixed
alias()
Creates an alias.
public
final alias(string $id, string $referencedId) : AliasConfigurator
Parameters
- $id : string
- $referencedId : string
Return values
AliasConfiguratordeprecate()
Whether this definition is deprecated, that means it should not be called anymore.
public
final deprecate(string $package, string $version, string $message) : $this
Parameters
- $package : string
-
The name of the composer package that is triggering the deprecation
- $version : string
-
The version of the package that introduced the deprecation
- $message : string
-
The deprecation message to use
Tags
Return values
$thisget()
Gets an already defined service definition.
public
final get(string $id) : ServiceConfigurator
Parameters
- $id : string
Tags
Return values
ServiceConfiguratorload()
Registers a PSR-4 namespace using a glob pattern.
public
final load(string $namespace, string $resource) : PrototypeConfigurator
Parameters
- $namespace : string
- $resource : string
Return values
PrototypeConfiguratorprivate()
public
final private() : $this
Return values
$thisprocessValue()
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
public()
public
final public() : $this
Return values
$thisremove()
Removes an already defined service definition or alias.
public
final remove(string $id) : ServicesConfigurator
Parameters
- $id : string
Return values
ServicesConfiguratorset()
Registers a service.
public
final set(string|null $id[, string $class = null ]) : ServiceConfigurator
Parameters
- $id : string|null
- $class : string = null
Return values
ServiceConfiguratorstack()
Registers a stack of decorator services.
public
final stack(string $id, array<string|int, InlineServiceConfigurator>|array<string|int, ReferenceConfigurator> $services) : AliasConfigurator
Parameters
- $id : string
- $services : array<string|int, InlineServiceConfigurator>|array<string|int, ReferenceConfigurator>