src/Config/Config.php
private function _getInstance($pFileStr)
    {
        $filePath = $this->_configPath;
        $file     = $filePath . str_replace('-', DS, $pFileStr) . self::EXT;

        if ($this->_envPrefix) {
            $file = preg_replace('/([a-z0-9]+\.)/i', $this->_envPrefix . '$1', $file);
        }

        if (! isset($this->_instance[$file])) {
            if (is_readable($file)) {
                $this->_instance[$file] = require($file);
            } else if ($this->_envPrefix
                and $file = $filePath . str_replace('-', DS, $pFileStr) . self::EXT
                and is_readable($file)) {
                $this->_instance[$file] = require($file);
            } else {
                $this->_instance[$file] = array();
            }
        }

        return $this->_instance[$file];
    }
private function _getInstance($pFileStr)
    {
        $filePath = $this->_configPath;
        $file     = $filePath . str_replace('-', DS, $pFileStr) . self::EXT;

        if ($this->_envPrefix) {
            $file = preg_replace('/([a-z0-9]+\.)/i', $this->_envPrefix . '$1', $file);
        }

        if (! isset($this->_instance[$file])) {
            if (is_readable($file)) {
                $this->_instance[$file] = require($file);
            } else if ($this->_envPrefix
                and $file = $filePath . str_replace('-', DS, $pFileStr) . self::EXT
                and is_readable($file)) {
                $this->_instance[$file] = require($file);
            } else {
                $this->_instance[$file] = array();
            }
        }

        return $this->_instance[$file];
    }
private function _getInstance ( $ pFileStr ) { $ filePath = $ this -> _configPath ; $ file = $ filePath . str_replace ( '-' , DS , $ pFileStr ) . self :: EXT ; if ( $ this -> _envPrefix ) { $ file = preg_replace ( '/([a-z0-9]+\.)/i' , $ this -> _envPrefix . '$1' , $ file ) ; } if ( ! isset ( $ this -> _instance [ $ file ] ) ) { if ( is_readable ( $ file ) ) { $ this -> _instance [ $ file ] = require ( $ file ) ; } else if ( $ this -> _envPrefix and $ file = $ filePath . str_replace ( '-' , DS , $ pFileStr ) . self :: EXT and is_readable ( $ file ) ) { $ this -> _instance [ $ file ] = require ( $ file ) ; } else { $ this -> _instance [ $ file ] = array ( ) ; } } return $ this -> _instance [ $ file ] ; }
Load configuration file content if not already loaded.

@param string $pFileStr File path to resolve
@return array Configuration file content
Load configuration file content if not already loaded .