public function parse()
    {
        $result = new stdClass();
        $cache = $parser = $exception = $cacheKey = $path = null;
        try {
            $path = $this->find(false);
            // Cached response
            $cache = new PathCache(__FUNCTION__, $this->options);
            $cacheKey = $cache->getKey([$path]);
            $result = $cache->readFrom($cacheKey);
            if ($result !== false) {
                return $result;
            }
            // Real response
            $parser = $this->getParser();
            $result = $parser->parse($path);
        } catch (InvalidArgumentException $exception) {
            $this->mergeMessages($exception, __FUNCTION__);
        }
        $this->mergeMessages($parser, __FUNCTION__);
        $this->mergeMessages($cache, __FUNCTION__);

        // Re-throw parser exception
        if ($exception) {
            throw $exception;
        }

        if ($cache && $cacheKey) {
            $cache->writeTo($cacheKey, $result, ['path' => $path]);
        }

        return $result;
    }
public function parse()
    {
        $result = new stdClass();
        $cache = $parser = $exception = $cacheKey = $path = null;
        try {
            $path = $this->find(false);
            // Cached response
            $cache = new PathCache(__FUNCTION__, $this->options);
            $cacheKey = $cache->getKey([$path]);
            $result = $cache->readFrom($cacheKey);
            if ($result !== false) {
                return $result;
            }
            // Real response
            $parser = $this->getParser();
            $result = $parser->parse($path);
        } catch (InvalidArgumentException $exception) {
            $this->mergeMessages($exception, __FUNCTION__);
        }
        $this->mergeMessages($parser, __FUNCTION__);
        $this->mergeMessages($cache, __FUNCTION__);

        // Re-throw parser exception
        if ($exception) {
            throw $exception;
        }

        if ($cache && $cacheKey) {
            $cache->writeTo($cacheKey, $result, ['path' => $path]);
        }

        return $result;
    }
public function parse ( ) { $ result = new stdClass ( ) ; $ cache = $ parser = $ exception = $ cacheKey = $ path = null ; try { $ path = $ this -> find ( false ) ; // Cached response $ cache = new PathCache ( __FUNCTION__ , $ this -> options ) ; $ cacheKey = $ cache -> getKey ( [ $ path ] ) ; $ result = $ cache -> readFrom ( $ cacheKey ) ; if ( $ result !== false ) { return $ result ; } // Real response $ parser = $ this -> getParser ( ) ; $ result = $ parser -> parse ( $ path ) ; } catch ( InvalidArgumentException $ exception ) { $ this -> mergeMessages ( $ exception , __FUNCTION__ ) ; } $ this -> mergeMessages ( $ parser , __FUNCTION__ ) ; $ this -> mergeMessages ( $ cache , __FUNCTION__ ) ; // Re-throw parser exception if ( $ exception ) { throw $ exception ; } if ( $ cache && $ cacheKey ) { $ cache -> writeTo ( $ cacheKey , $ result , [ 'path' => $ path ] ) ; } return $ result ; }
Parse module configuration file

@return object Whatever Parser returned
Parse module configuration file