PHP Class DI\Definition\Source\DefinitionArray

Author: Matthieu Napoli ([email protected])
Inheritance: implements DI\Definition\Source\DefinitionSource, implements DI\Definition\Source\MutableDefinitionSource
Datei anzeigen Open project: mnapoli/php-di Class Usage Examples

Public Methods

Method Description
__construct ( array $definitions = [] )
addDefinition ( DI\Definition\Definition $definition )
addDefinitions ( array $definitions )
getDefinition ( $name )

Private Methods

Method Description
castDefinition ( mixed $definition, string $name ) : DI\Definition\Definition
replaceWildcards ( string $string, array $replacements ) : string Replaces all the wildcards in the string with the given replacements.

Method Details

__construct() public method

public __construct ( array $definitions = [] )
$definitions array

addDefinition() public method

public addDefinition ( DI\Definition\Definition $definition )
$definition DI\Definition\Definition

addDefinitions() public method

public addDefinitions ( array $definitions )
$definitions array DI definitions in a PHP array indexed by the definition name.

getDefinition() public method

public getDefinition ( $name )