AliasConfigurator
extends AbstractServiceConfigurator
in package
Uses
DeprecateTrait, PublicTrait
Tags
Table of Contents
- FACTORY = 'alias'
- $id : mixed
- $parent : mixed
- $defaultTags : mixed
- __call() : mixed
- __construct() : mixed
- __destruct() : mixed
- __invoke() : ServiceConfigurator
- Registers a service.
- 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
- set() : ServiceConfigurator
- Registers a service.
Constants
FACTORY
public
mixed
FACTORY
= 'alias'
Properties
$id
protected
mixed
$id
$parent
protected
mixed
$parent
$defaultTags
private
mixed
$defaultTags
= []
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(ServicesConfigurator $parent, Alias $alias) : mixed
Parameters
- $parent : ServicesConfigurator
- $alias : Alias
Return values
mixed —__destruct()
public
__destruct() : mixed
Return values
mixed —__invoke()
Registers a service.
public
final __invoke(string $id[, string $class = null ]) : ServiceConfigurator
Parameters
- $id : string
- $class : string = null
Return values
ServiceConfigurator —alias()
Creates an alias.
public
final alias(string $id, string $referencedId) : AliasConfigurator
Parameters
- $id : string
- $referencedId : string
Return values
AliasConfigurator —deprecate()
Whether this definition is deprecated, that means it should not be called anymore.
public
final deprecate([string $template = null ]) : $this
Parameters
- $template : string = null
-
Template message to use if the definition is deprecated
Tags
Return values
$this —get()
Gets an already defined service definition.
public
final get(string $id) : ServiceConfigurator
Parameters
- $id : string
Tags
Return values
ServiceConfigurator —load()
Registers a PSR-4 namespace using a glob pattern.
public
final load(string $namespace, string $resource) : PrototypeConfigurator
Parameters
- $namespace : string
- $resource : string
Return values
PrototypeConfigurator —private()
public
final private() : $this
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
public()
public
final public() : $this
Return values
$this —set()
Registers a service.
public
final set(string|null $id[, string $class = null ]) : ServiceConfigurator
Parameters
- $id : string|null
- $class : string = null