PHP Class N98\Magento\Application\ConfigurationLoader

The configuration which is global (not Magento project specific) is loaded during construction. As soon as the Magento folder is known, loadStageTwo should be called. The toArray method only works if the Magento folder specific configuration is already loaded. Class ConfigurationLoader
Datei anzeigen Open project: netz98/n98-magerun

Protected Properties

Property Type Description
$_configArray array
$_customConfigFilename string
$_distConfig array Cache
$_initialConfig array Config passed in the constructor
$_isPharMode boolean
$_output Symfony\Component\Console\Output\OutputInterface
$_pluginConfig array Cache
$_projectConfig array Cache
$_systemConfig array Cache
$_userConfig array Cache

Public Methods

Method Description
__construct ( array $config, boolean $isPharMode, Symfony\Component\Console\Output\OutputInterface $output ) Load config If $magentoRootFolder is null, only non-project config is loaded
getConfigurationLoaderDir ( ) : string
getPartialConfig ( boolean $loadExternalConfig = true ) : array
getVendorDir ( ) : string
loadPluginConfig ( array $config, string $magentoRootFolder ) : array Load config from all installed bundles
loadProjectConfig ( string $magentoRootFolder, string $magerunStopFileFolder, array $config ) : array MAGENTO_ROOT/app/etc/n98-magerun.yaml
loadStageTwo ( string $magentoRootFolder, boolean $loadExternalConfig = true, string $magerunStopFileFolder = '' )
loadSystemConfig ( array $config ) : array Check if there is a global config file in /etc folder
loadUserConfig ( array $config, string $magentoRootFolder = null ) : array Check if there is a user config file. ~/.n98-magerun.yaml
toArray ( ) : array

Protected Methods

Method Description
loadDistConfig ( array $initConfig ) : array
registerPluginConfigFile ( string $magentoRootFolder, Symfony\Component\Finder\SplFileInfo $file ) Loads a plugin config file and merges it to plugin config

Private Methods

Method Description
log ( string $message )
logDebug ( string $message )

Method Details

__construct() public method

Load config If $magentoRootFolder is null, only non-project config is loaded
public __construct ( array $config, boolean $isPharMode, Symfony\Component\Console\Output\OutputInterface $output )
$config array
$isPharMode boolean
$output Symfony\Component\Console\Output\OutputInterface

getConfigurationLoaderDir() public method

getPartialConfig() public method

public getPartialConfig ( boolean $loadExternalConfig = true ) : array
$loadExternalConfig boolean
return array

getVendorDir() public method

public getVendorDir ( ) : string
return string

loadDistConfig() protected method

protected loadDistConfig ( array $initConfig ) : array
$initConfig array
return array

loadPluginConfig() public method

Load config from all installed bundles
public loadPluginConfig ( array $config, string $magentoRootFolder ) : array
$config array
$magentoRootFolder string
return array

loadProjectConfig() public method

MAGENTO_ROOT/app/etc/n98-magerun.yaml
public loadProjectConfig ( string $magentoRootFolder, string $magerunStopFileFolder, array $config ) : array
$magentoRootFolder string
$magerunStopFileFolder string
$config array
return array

loadStageTwo() public method

public loadStageTwo ( string $magentoRootFolder, boolean $loadExternalConfig = true, string $magerunStopFileFolder = '' )
$magentoRootFolder string
$loadExternalConfig boolean
$magerunStopFileFolder string

loadSystemConfig() public method

Check if there is a global config file in /etc folder
public loadSystemConfig ( array $config ) : array
$config array
return array

loadUserConfig() public method

Check if there is a user config file. ~/.n98-magerun.yaml
public loadUserConfig ( array $config, string $magentoRootFolder = null ) : array
$config array
$magentoRootFolder string [optional]
return array

registerPluginConfigFile() protected method

Loads a plugin config file and merges it to plugin config
protected registerPluginConfigFile ( string $magentoRootFolder, Symfony\Component\Finder\SplFileInfo $file )
$magentoRootFolder string
$file Symfony\Component\Finder\SplFileInfo

toArray() public method

public toArray ( ) : array
return array

Property Details

$_configArray protected_oe property

protected array $_configArray
return array

$_customConfigFilename protected_oe property

protected string $_customConfigFilename
return string

$_distConfig protected_oe property

Cache
protected array $_distConfig
return array

$_initialConfig protected_oe property

Config passed in the constructor
protected array $_initialConfig
return array

$_isPharMode protected_oe property

protected bool $_isPharMode
return boolean

$_output protected_oe property

protected OutputInterface,Symfony\Component\Console\Output $_output
return Symfony\Component\Console\Output\OutputInterface

$_pluginConfig protected_oe property

Cache
protected array $_pluginConfig
return array

$_projectConfig protected_oe property

Cache
protected array $_projectConfig
return array

$_systemConfig protected_oe property

Cache
protected array $_systemConfig
return array

$_userConfig protected_oe property

Cache
protected array $_userConfig
return array