PHP Class Elcodi\Common\CommonBundle\DependencyInjection\ElcodiCommonExtension

Inheritance: extends Elcodi\Bundle\CoreBundle\DependencyInjection\Abstracts\AbstractExtension
Show file Open project: elcodi/bamboo

Public Methods

Method Description
getAlias ( ) : string Returns the extension alias, same value as extension name
getConfigFilesLocation ( ) : string Get the Config file location

Protected Methods

Method Description
getConfigFiles ( array $config ) : array Config files to load
getConfigurationInstance ( ) : Symfony\Component\Config\Definition\ConfigurationInterface Return a new Configuration instance.
getParametrizationValues ( array $config ) : array Load Parametrization definition

Method Details

getAlias() public method

Returns the extension alias, same value as extension name
public getAlias ( ) : string
return string The alias

getConfigFiles() protected method

Each array position can be a simple file name if must be loaded always, or an array, with the filename in the first position, and a boolean in the second one. As a parameter, this method receives all loaded configuration, to allow setting this boolean value from a configuration value. return array( 'file1.yml', 'file2.yml', ['file3.yml', $config['my_boolean'], ... );
protected getConfigFiles ( array $config ) : array
$config array Config definitions
return array Config files

getConfigFilesLocation() public method

Get the Config file location
public getConfigFilesLocation ( ) : string
return string Config file location

getConfigurationInstance() protected method

If object returned by this method is an instance of ConfigurationInterface, extension will use the Configuration to read all bundle config definitions. Also will call getParametrizationValues method to load some config values to internal parameters.
protected getConfigurationInstance ( ) : Symfony\Component\Config\Definition\ConfigurationInterface
return Symfony\Component\Config\Definition\ConfigurationInterface Configuration file

getParametrizationValues() protected method

return array( 'parameter1' => $config['parameter1'], 'parameter2' => $config['parameter2'], ... );
protected getParametrizationValues ( array $config ) : array
$config array Bundles config values
return array Parametrization values