Documentation

DefinitionFile extends DefinitionArray
in package

Reads DI definitions from a file returning a PHP array.

Tags
author

Matthieu Napoli matthieu@mnapoli.fr

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

Properties

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|null

getDefinitions()

public getDefinitions() : array<string, Definition>
Return values
array<string, Definition>

Definitions indexed by their name.

initialize()

Lazy-loading of the definitions.

private initialize() : void

        
On this page

Search results