src/Config/Config.php
private function _getConfigValues($pPath, $pForceGlobalArray)
    {
        $pathArr = explode(DS, $pPath, 2);
        if (! isset($pathArr[1])) {
            return NULL;
        }

        $path = rtrim($pathArr[1], '/');

        if ($pPath === self::CONFIG_EVENTS_PATH) {
            $content = $this->_getEventsConfig();
        } else {
            $content = $this->_getInstance($pathArr[0]);
        }

        if ($path) {
            $pathArr = explode('/', $path);
            $nbKeys  = count($pathArr) - 1;

            foreach($pathArr as $i => $key) {
                $key = str_replace('#', '/', $key);

                if (! isset($content[$key])) {
                    $this->_cache[$pPath] = NULL;
                    break;
                } else if ($i < $nbKeys) {
                    $content = $content[$key];
                } else if ($i == $nbKeys) {
                    $this->_cache[$pPath] = $content[$key];
                }
            }
        } else {
            $this->_cache[$pPath] = $content;
        }

        if ($pForceGlobalArray and (! is_array($this->_cache[$pPath]) or (is_array($this->_cache[$pPath]) and ! array_key_exists(0, $this->_cache[$pPath])))) {
            $this->_cache[$pPath] = array($this->_cache[$pPath]);
        }

        return $this->_cache[$pPath];
    }
private function _getConfigValues($pPath, $pForceGlobalArray)
    {
        $pathArr = explode(DS, $pPath, 2);
        if (! isset($pathArr[1])) {
            return NULL;
        }

        $path = rtrim($pathArr[1], '/');

        if ($pPath === self::CONFIG_EVENTS_PATH) {
            $content = $this->_getEventsConfig();
        } else {
            $content = $this->_getInstance($pathArr[0]);
        }

        if ($path) {
            $pathArr = explode('/', $path);
            $nbKeys  = count($pathArr) - 1;

            foreach($pathArr as $i => $key) {
                $key = str_replace('#', '/', $key);

                if (! isset($content[$key])) {
                    $this->_cache[$pPath] = NULL;
                    break;
                } else if ($i < $nbKeys) {
                    $content = $content[$key];
                } else if ($i == $nbKeys) {
                    $this->_cache[$pPath] = $content[$key];
                }
            }
        } else {
            $this->_cache[$pPath] = $content;
        }

        if ($pForceGlobalArray and (! is_array($this->_cache[$pPath]) or (is_array($this->_cache[$pPath]) and ! array_key_exists(0, $this->_cache[$pPath])))) {
            $this->_cache[$pPath] = array($this->_cache[$pPath]);
        }

        return $this->_cache[$pPath];
    }
private function _getConfigValues ( $ pPath , $ pForceGlobalArray ) { $ pathArr = explode ( DS , $ pPath , 2 ) ; if ( ! isset ( $ pathArr [ 1 ] ) ) { return NULL ; } $ path = rtrim ( $ pathArr [ 1 ] , '/' ) ; if ( $ pPath === self :: CONFIG_EVENTS_PATH ) { $ content = $ this -> _getEventsConfig ( ) ; } else { $ content = $ this -> _getInstance ( $ pathArr [ 0 ] ) ; } if ( $ path ) { $ pathArr = explode ( '/' , $ path ) ; $ nbKeys = count ( $ pathArr ) - 1 ; foreach ( $ pathArr as $ i => $ key ) { $ key = str_replace ( '#' , '/' , $ key ) ; if ( ! isset ( $ content [ $ key ] ) ) { $ this -> _cache [ $ pPath ] = NULL ; break ; } else if ( $ i < $ nbKeys ) { $ content = $ content [ $ key ] ; } else if ( $ i == $ nbKeys ) { $ this -> _cache [ $ pPath ] = $ content [ $ key ] ; } } } else { $ this -> _cache [ $ pPath ] = $ content ; } if ( $ pForceGlobalArray and ( ! is_array ( $ this -> _cache [ $ pPath ] ) or ( is_array ( $ this -> _cache [ $ pPath ] ) and ! array_key_exists ( 0 , $ this -> _cache [ $ pPath ] ) ) ) ) { $ this -> _cache [ $ pPath ] = array ( $ this -> _cache [ $ pPath ] ) ; } return $ this -> _cache [ $ pPath ] ; }
Return NULL, the config value or an array of values corresponding to the
requested path.

@param string $pPath Requested path
@param bool $pForceGlobalArray Return the results in a miltidimensional
array
@return mixed
Return NULL the config value or an array of values corresponding to the requested path .