DefaultsConfigurator
class DefaultsConfigurator extends AbstractServiceConfigurator
Traits
Constants
Properties
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, Definition $definition, string $id = null, array $defaultTags = array()) |
from AbstractServiceConfigurator |
|
__destruct() |
from AbstractServiceConfigurator |
ServiceConfigurator |
set(string $id, string $class = null) Registers a service. |
from AbstractServiceConfigurator |
AliasConfigurator |
alias(string $id, string $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 $class = null) Registers a service. |
from AbstractServiceConfigurator |
$this |
autoconfigure(bool $autoconfigured = true) Sets whether or not instanceof conditionals should be prepended with a global set. |
from AutoconfigureTrait |
$this |
autowire(bool $autowired = true) Enables/disables autowiring. |
from AutowireTrait |
$this |
bind(string $nameOrFqcn, mixed $valueOrRef) Sets bindings. |
from BindTrait |
$this |
public() |
from PublicTrait |
$this |
private() |
from PublicTrait |
$this |
tag(string $name, array $attributes = array()) Adds a tag for this definition. |
|
InstanceofConfigurator |
instanceof(string $fqcn) Defines an instanceof-conditional to be applied to following service definitions. |
|
Details
__call($method, $args)
Parameters
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 = array())
Parameters
__destruct()
final ServiceConfigurator set(string $id, string $class = null)
Registers a service.
Parameters
Return Value
final AliasConfigurator alias(string $id, string $referencedId)
Creates an alias.
Parameters
string |
$id |
|
string |
$referencedId |
|
Return Value
final PrototypeConfigurator load(string $namespace, string $resource)
Registers a PSR-4 namespace using a glob pattern.
Parameters
string |
$namespace |
|
string |
$resource |
|
Return Value
Gets an already defined service definition.
Parameters
Return Value
Exceptions
final ServiceConfigurator __invoke(string $id, string $class = null)
Registers a service.
Parameters
Return Value
Sets whether or not instanceof conditionals should be prepended with a global set.
Parameters
Return Value
Exceptions
final $this autowire(bool $autowired = true)
Enables/disables autowiring.
Parameters
Return Value
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
final $this public()
Return Value
final $this private()
Return Value
final $this tag(string $name, array $attributes = array())
Adds a tag for this definition.
Parameters
string |
$name |
|
array |
$attributes |
|
Return Value
Exceptions
Defines an instanceof-conditional to be applied to following service definitions.
Parameters
Return Value