Documentation

ServicesConfigurator extends AbstractConfigurator
in package

Tags
author

Nicolas Grekas p@tchwork.com

Table of Contents

FACTORY  = 'services'
$valuePreProcessor  : callable
$anonymousCount  : mixed
$anonymousHash  : mixed
$container  : mixed
$defaults  : mixed
$instanceof  : mixed
$loader  : mixed
$path  : mixed
__call()  : mixed
__construct()  : mixed
__destruct()  : mixed
__invoke()  : ServiceConfigurator
Registers a service.
__sleep()  : array<string|int, mixed>
__wakeup()  : mixed
alias()  : AliasConfigurator
Creates an alias.
defaults()  : DefaultsConfigurator
Defines a set of defaults for following service definitions.
get()  : ServiceConfigurator
Gets an already defined service definition.
instanceof()  : InstanceofConfigurator
Defines an instanceof-conditional to be applied to following service definitions.
load()  : PrototypeConfigurator
Registers a PSR-4 namespace using a glob pattern.
processValue()  : mixed
Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value.
remove()  : $this
Removes an already defined service definition or alias.
set()  : ServiceConfigurator
Registers a service.
stack()  : AliasConfigurator
Registers a stack of decorator services.

Constants

Properties

Methods

__call()

public __call(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string
$args : array<string|int, mixed>
Return values
mixed

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

remove()

Removes an already defined service definition or alias.

public final remove(string $id) : $this
Parameters
$id : string
Return values
$this

set()

Registers a service.

public final set(string|null $id[, string|null $class = null ]) : ServiceConfigurator
Parameters
$id : string|null

The service id, or null to create an anonymous service

$class : string|null = null

The class of the service, or null when $id is also the class name

Return values
ServiceConfigurator

Search results