DefinitionArray
in package
implements
DefinitionSource, MutableDefinitionSource
Reads DI definitions from a PHP array.
Tags
Table of Contents
Interfaces
- DefinitionSource
- Source of definitions for entries of the container.
- MutableDefinitionSource
- Describes a definition source to which we can add new definitions.
Constants
- WILDCARD = '*'
- WILDCARD_PATTERN = '([^\\\\]+)'
- Matches anything except "\".
Properties
- $definitions : array<string|int, mixed>
- DI definitions in a PHP array.
- $normalizer : DefinitionNormalizer
- $wildcardDefinitions : array<string|int, mixed>|null
- Cache of wildcard definitions.
Methods
- __construct() : mixed
- addDefinition() : void
- addDefinitions() : void
- getDefinition() : Definition|null
- Returns the DI definition for the entry name.
- getDefinitions() : array<string, Definition>
Constants
WILDCARD
public
mixed
WILDCARD
= '*'
WILDCARD_PATTERN
Matches anything except "\".
private
mixed
WILDCARD_PATTERN
= '([^\\\\]+)'
Properties
$definitions
DI definitions in a PHP array.
private
array<string|int, mixed>
$definitions
$normalizer
private
DefinitionNormalizer
$normalizer
$wildcardDefinitions
Cache of wildcard definitions.
private
array<string|int, mixed>|null
$wildcardDefinitions
= null
Methods
__construct()
public
__construct([array<string|int, mixed> $definitions = [] ][, Autowiring|null $autowiring = null ]) : mixed
Parameters
- $definitions : array<string|int, mixed> = []
- $autowiring : Autowiring|null = null
addDefinition()
public
addDefinition(Definition $definition) : void
Parameters
- $definition : Definition
addDefinitions()
public
addDefinitions(array<string|int, mixed> $definitions) : void
Parameters
- $definitions : array<string|int, mixed>
-
DI definitions in a PHP array indexed by the definition name.
getDefinition()
Returns the DI definition for the entry name.
public
getDefinition(string $name) : Definition|null
Parameters
- $name : string
Return values
Definition|nullgetDefinitions()
public
getDefinitions() : array<string, Definition>
Return values
array<string, Definition> —Definitions indexed by their name.