core/base/Boot.php
public function getConfigArray()
    {
        if ($this->_configArray === null) {
            if (!file_exists($this->configFile)) {
                if (!$this->getIsCli()) {
                    throw new Exception("Unable to load the config file '".$this->configFile."'.");
                }
                
                $config = ['id' => 'consoleapp', 'basePath' => dirname(__DIR__)];
            } else {
                $config = require $this->configFile;
            }
    
            if (!is_array($config)) {
                throw new Exception("config file '".$this->configFile."' found but no array returning.");
            }
            
            // preset the values from the defaultConfigArray
            if (!empty($this->prependConfigArray())) {
                $config = ArrayHelper::merge($config, $this->prependConfigArray());
            }
         
            $this->_configArray = $config;
        }

        return $this->_configArray;
    }
public function getConfigArray()
    {
        if ($this->_configArray === null) {
            if (!file_exists($this->configFile)) {
                if (!$this->getIsCli()) {
                    throw new Exception("Unable to load the config file '".$this->configFile."'.");
                }
                
                $config = ['id' => 'consoleapp', 'basePath' => dirname(__DIR__)];
            } else {
                $config = require $this->configFile;
            }
    
            if (!is_array($config)) {
                throw new Exception("config file '".$this->configFile."' found but no array returning.");
            }
            
            // preset the values from the defaultConfigArray
            if (!empty($this->prependConfigArray())) {
                $config = ArrayHelper::merge($config, $this->prependConfigArray());
            }
         
            $this->_configArray = $config;
        }

        return $this->_configArray;
    }
public function getConfigArray ( ) { if ( $ this -> _configArray === null ) { if ( ! file_exists ( $ this -> configFile ) ) { if ( ! $ this -> getIsCli ( ) ) { throw new Exception ( "Unable to load the config file '" . $ this -> configFile . "'." ) ; } $ config = [ 'id' => 'consoleapp' , 'basePath' => dirname ( __DIR__ ) ] ; } else { $ config = require $ this -> configFile ; } if ( ! is_array ( $ config ) ) { throw new Exception ( "config file '" . $ this -> configFile . "' found but no array returning." ) ; } // preset the values from the defaultConfigArray if ( ! empty ( $ this -> prependConfigArray ( ) ) ) { $ config = ArrayHelper :: merge ( $ config , $ this -> prependConfigArray ( ) ) ; } $ this -> _configArray = $ config ; } return $ this -> _configArray ; }
Get the config array from the configFile path with the predefined values.

@throws \luya\Exception Throws exception if the config file does not exists.
@return array The array which will be injected into the Application Constructor.
Get the config array from the configFile path with the predefined values .