DecoratorDefinition
extends FactoryDefinition
in package
implements
Definition, ExtendsPreviousDefinition
Factory that decorates a sub-definition.
Tags
Table of Contents
Interfaces
- Definition
- ExtendsPreviousDefinition
- A definition that extends a previous definition with the same name.
Properties
- $decorated : Definition|null
Methods
- __construct() : mixed
- __toString() : string
- getCallable() : callable|array<string|int, mixed>|string
- getDecoratedDefinition() : Definition|null
- getName() : string
- getParameters() : array<string|int, mixed>
- replaceNestedDefinitions() : void
- setExtendedDefinition() : void
- setName() : void
Properties
$decorated
private
Definition|null
$decorated
= null
Methods
__construct()
public
__construct(string $name, callable|array<string|int, mixed>|string $factory[, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
- $name : string
-
Entry name
- $factory : callable|array<string|int, mixed>|string
-
Callable that returns the value associated to the entry name.
- $parameters : array<string|int, mixed> = []
-
Parameters to be passed to the callable
__toString()
public
__toString() : string
Return values
stringgetCallable()
public
getCallable() : callable|array<string|int, mixed>|string
Return values
callable|array<string|int, mixed>|string —Callable that returns the value associated to the entry name.
getDecoratedDefinition()
public
getDecoratedDefinition() : Definition|null
Return values
Definition|nullgetName()
public
getName() : string
Return values
stringgetParameters()
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array containing the parameters to be passed to the callable, indexed by name.
replaceNestedDefinitions()
public
replaceNestedDefinitions(callable $replacer) : void
Parameters
- $replacer : callable
setExtendedDefinition()
public
setExtendedDefinition(Definition $definition) : void
Parameters
- $definition : Definition
setName()
public
setName(string $name) : void
Parameters
- $name : string