class DefaultsConfigurator extends AbstractServiceConfigurator

Traits

Constants

FACTORY

Properties

protected $definition from AbstractConfigurator
protected $parent from AbstractServiceConfigurator
protected $id from AbstractServiceConfigurator

Methods

__call($method, $args)

No description

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

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

__construct(ServicesConfigurator $parent, Definition $definition, string $id = null, array $defaultTags = [])

No description

__destruct()

No description

set(string $id, string $class = null)

Registers a service.

alias(string $id, string $referencedId)

Creates an alias.

load(string $namespace, string $resource)

Registers a PSR-4 namespace using a glob pattern.

get(string $id)

Gets an already defined service definition.

__invoke(string $id, string $class = null)

Registers a service.

$this
autoconfigure(bool $autoconfigured = true)

Sets whether or not instanceof conditionals should be prepended with a global set.

$this
autowire(bool $autowired = true)

Enables/disables autowiring.

$this
bind(string $nameOrFqcn, mixed $valueOrRef)

Sets bindings.

from BindTrait
$this
public()

No description

$this
private()

No description

$this
tag(string $name, array $attributes = [])

Adds a tag for this definition.

instanceof(string $fqcn)

Defines an instanceof-conditional to be applied to following service definitions.

Details

in AbstractConfigurator at line 28
__call($method, $args)

Parameters

$method
$args

in AbstractConfigurator at line 45
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, optionally cast to a Definition/Reference

__construct(ServicesConfigurator $parent, Definition $definition, string $id = null, array $defaultTags = [])

Parameters

ServicesConfigurator $parent
Definition $definition
string $id
array $defaultTags

__destruct()

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

Registers a service.

Parameters

string $id
string $class

Return Value

ServiceConfigurator

final AliasConfigurator alias(string $id, string $referencedId)

Creates an alias.

Parameters

string $id
string $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 $class = null)

Registers a service.

Parameters

string $id
string $class

Return Value

ServiceConfigurator

in AutoconfigureTrait at line 26
final $this autoconfigure(bool $autoconfigured = true)

Sets whether or not instanceof conditionals should be prepended with a global set.

Parameters

bool $autoconfigured

Return Value

$this

Exceptions

InvalidArgumentException when a parent is already set

in AutowireTrait at line 21
final $this autowire(bool $autowired = true)

Enables/disables autowiring.

Parameters

bool $autowired

Return Value

$this

in BindTrait at line 31
final $this bind(string $nameOrFqcn, mixed $valueOrRef)

Sets bindings.

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

string $nameOrFqcn A parameter name with its "$" prefix, or a FQCN
mixed $valueOrRef The value or reference to bind

Return Value

$this

in PublicTrait at line 19
final $this public()

Return Value

$this

in PublicTrait at line 29
final $this private()

Return Value

$this

at line 35
final $this tag(string $name, array $attributes = [])

Adds a tag for this definition.

Parameters

string $name
array $attributes

Return Value

$this

Exceptions

InvalidArgumentException when an invalid tag name or attribute is provided

at line 57
final InstanceofConfigurator instanceof(string $fqcn)

Defines an instanceof-conditional to be applied to following service definitions.

Parameters

string $fqcn

Return Value

InstanceofConfigurator