Documentation

DefaultsConfigurator extends AbstractServiceConfigurator
in package
Uses AutoconfigureTrait, AutowireTrait, BindTrait, PublicTrait

Tags
author

Nicolas Grekas p@tchwork.com

Table of Contents

FACTORY  = 'defaults'
$valuePreProcessor  : callable
$id  : mixed
$parent  : mixed
$defaultTags  : 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.
autoconfigure()  : $this
Sets whether or not instanceof conditionals should be prepended with a global set.
autowire()  : $this
Enables/disables autowiring.
bind()  : $this
Sets bindings.
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.
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.
tag()  : $this
Adds a tag for this definition.

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>

autoconfigure()

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

public final autoconfigure([bool $autoconfigured = true ]) : $this
Parameters
$autoconfigured : bool = true
Tags
throws
InvalidArgumentException

when a parent is already set

Return values
$this

autowire()

Enables/disables autowiring.

public final autowire([bool $autowired = true ]) : $this
Parameters
$autowired : bool = true
Return values
$this

bind()

Sets bindings.

public final bind(string $nameOrFqcn, mixed $valueOrRef) : $this

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
$nameOrFqcn : string

A parameter name with its "$" prefix, or an FQCN

$valueOrRef : mixed

The value or reference to bind

Return values
$this

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

tag()

Adds a tag for this definition.

public final tag(string $name[, array<string|int, mixed> $attributes = [] ]) : $this
Parameters
$name : string
$attributes : array<string|int, mixed> = []
Tags
throws
InvalidArgumentException

when an invalid tag name or attribute is provided

Return values
$this

Search results