DefinitionFile
extends DefinitionArray
in package
Reads DI definitions from a file returning a PHP array.
Tags
Table of Contents
Constants
- WILDCARD = '*'
Properties
- $file : string
- $initialized : bool
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
= '*'
Properties
$file
private
string
$file
$initialized
private
bool
$initialized
= false
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