DefinitionFile
extends DefinitionArray
in package
Reads DI definitions from a file returning a PHP array.
Tags
Table of Contents
Constants
- WILDCARD = '*'
- WILDCARD_PATTERN = '([^\\\\]+)'
- Matches anything except "\".
Properties
- $definitions : array<string|int, mixed>
- DI definitions in a PHP array.
- $file : string
- $initialized : bool
- $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>
- initialize() : void
- Lazy-loading of the definitions.
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
$file
private
string
$file
$initialized
private
bool
$initialized
= false
$normalizer
private
DefinitionNormalizer
$normalizer
$wildcardDefinitions
Cache of wildcard definitions.
private
array<string|int, mixed>|null
$wildcardDefinitions
= null
Methods
__construct()
public
__construct(string $file[, Autowiring|null $autowiring = null ]) : mixed
Parameters
- $file : string
-
File in which the definitions are returned as an array.
- $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.
initialize()
Lazy-loading of the definitions.
private
initialize() : void