AliasConfigurator

class AliasConfigurator extends AbstractServiceConfigurator

Traits

PublicTrait

Constants

FACTORY

Methods

__call($method, $args) from AbstractConfigurator
static mixed processValue(mixed $value, bool $allowServices = false)

Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value.

from AbstractConfigurator
__construct(ServicesConfigurator $parent, Alias $alias)
__destruct() from AbstractServiceConfigurator
ServiceConfigurator set(string $id, string|null $class = null)

Registers a service.

from AbstractServiceConfigurator
AliasConfigurator alias($id, $referencedId)

Creates an alias.

from AbstractServiceConfigurator
PrototypeConfigurator load(string $namespace, string $resource)

Registers a PSR-4 namespace using a glob pattern.

from AbstractServiceConfigurator
ServiceConfigurator get(string $id)

Gets an already defined service definition.

from AbstractServiceConfigurator
ServiceConfigurator __invoke(string $id, string|null $class = null)

Registers a service.

from AbstractServiceConfigurator

Details

__call($method, $args)

Parameters

$method
$args

static mixed processValue(mixed $value, bool $allowServices = false)

Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value.

Parameters

mixed $value
bool $allowServices whether Definition and Reference are allowed; by default, only scalars and arrays are

Return Value

mixed the value, optionaly cast to a Definition/Reference

__construct(ServicesConfigurator $parent, Alias $alias)

Parameters

ServicesConfigurator $parent
Alias $alias

__destruct()

final ServiceConfigurator set(string $id, string|null $class = null)

Registers a service.

Parameters

string $id
string|null $class

Return Value

ServiceConfigurator

final AliasConfigurator alias($id, $referencedId)

Creates an alias.

Parameters

$id
$referencedId

Return Value

AliasConfigurator

final PrototypeConfigurator load(string $namespace, string $resource)

Registers a PSR-4 namespace using a glob pattern.

Parameters

string $namespace
string $resource

Return Value

PrototypeConfigurator

final ServiceConfigurator get(string $id)

Gets an already defined service definition.

Parameters

string $id

Return Value

ServiceConfigurator

Exceptions

ServiceNotFoundException if the service definition does not exist

final ServiceConfigurator __invoke(string $id, string|null $class = null)

Registers a service.

Parameters

string $id
string|null $class

Return Value

ServiceConfigurator