PHP Класс 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
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
loadDistConfig ( array $initConfig ) : array
registerPluginConfigFile ( string $magentoRootFolder, Symfony\Component\Finder\SplFileInfo $file ) Loads a plugin config file and merges it to plugin config

Приватные методы

Метод Описание
log ( string $message )
logDebug ( string $message )

Описание методов

__construct() публичный метод

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 getConfigurationLoaderDir ( ) : string
Результат string

getPartialConfig() публичный метод

public getPartialConfig ( boolean $loadExternalConfig = true ) : array
$loadExternalConfig boolean
Результат array

getVendorDir() публичный метод

public getVendorDir ( ) : string
Результат string

loadDistConfig() защищенный метод

protected loadDistConfig ( array $initConfig ) : array
$initConfig array
Результат array

loadPluginConfig() публичный метод

Load config from all installed bundles
public loadPluginConfig ( array $config, string $magentoRootFolder ) : array
$config array
$magentoRootFolder string
Результат array

loadProjectConfig() публичный метод

MAGENTO_ROOT/app/etc/n98-magerun.yaml
public loadProjectConfig ( string $magentoRootFolder, string $magerunStopFileFolder, array $config ) : array
$magentoRootFolder string
$magerunStopFileFolder string
$config array
Результат array

loadStageTwo() публичный метод

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

loadSystemConfig() публичный метод

Check if there is a global config file in /etc folder
public loadSystemConfig ( array $config ) : array
$config array
Результат array

loadUserConfig() публичный метод

Check if there is a user config file. ~/.n98-magerun.yaml
public loadUserConfig ( array $config, string $magentoRootFolder = null ) : array
$config array
$magentoRootFolder string [optional]
Результат array

registerPluginConfigFile() защищенный метод

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 toArray ( ) : array
Результат array

Описание свойств

$_configArray защищенное свойство

protected array $_configArray
Результат array

$_customConfigFilename защищенное свойство

protected string $_customConfigFilename
Результат string

$_distConfig защищенное свойство

Cache
protected array $_distConfig
Результат array

$_initialConfig защищенное свойство

Config passed in the constructor
protected array $_initialConfig
Результат array

$_isPharMode защищенное свойство

protected bool $_isPharMode
Результат boolean

$_output защищенное свойство

protected OutputInterface,Symfony\Component\Console\Output $_output
Результат Symfony\Component\Console\Output\OutputInterface

$_pluginConfig защищенное свойство

Cache
protected array $_pluginConfig
Результат array

$_projectConfig защищенное свойство

Cache
protected array $_projectConfig
Результат array

$_systemConfig защищенное свойство

Cache
protected array $_systemConfig
Результат array

$_userConfig защищенное свойство

Cache
protected array $_userConfig
Результат array