protected function loadCache()
    {
        if ($this->isCacheValid() === false) {
            return null;
        }

        $data = null;

        try {
            $data = $this->cacheFile->parse();
        } catch (ParseException $e) {
            // JSON is invalid, remove the file
            $this->invalidateCache();
        } catch (IOException $e) {
            $part = Translator::__(
                'Try logging in with your ftp-client and make the file readable. ' .
                'Else try to go <a>back</a> to the last page.'
            );
            $message = '<p>' . Translator::__('general.phrase.file-not-readable-following-colon') . '</p>' .
                '<pre>' . htmlspecialchars($this->cacheFile->getFullPath()) . '</pre>' .
                '<p>' . str_replace('<a>', '<a href="javascript:history.go(-1)">', $part) . '</p>';

            throw new RuntimeException(Translator::__('page.file-management.message.file-not-readable' . $message), $e->getCode(), $e);
        }

        // Check if we loaded actual data.
        if (count($data) < 4 || empty($data['general'])) {
            return null;
        }

        // Yup, all seems to be right.
        return $data;
    }
protected function loadCache()
    {
        if ($this->isCacheValid() === false) {
            return null;
        }

        $data = null;

        try {
            $data = $this->cacheFile->parse();
        } catch (ParseException $e) {
            // JSON is invalid, remove the file
            $this->invalidateCache();
        } catch (IOException $e) {
            $part = Translator::__(
                'Try logging in with your ftp-client and make the file readable. ' .
                'Else try to go <a>back</a> to the last page.'
            );
            $message = '<p>' . Translator::__('general.phrase.file-not-readable-following-colon') . '</p>' .
                '<pre>' . htmlspecialchars($this->cacheFile->getFullPath()) . '</pre>' .
                '<p>' . str_replace('<a>', '<a href="javascript:history.go(-1)">', $part) . '</p>';

            throw new RuntimeException(Translator::__('page.file-management.message.file-not-readable' . $message), $e->getCode(), $e);
        }

        // Check if we loaded actual data.
        if (count($data) < 4 || empty($data['general'])) {
            return null;
        }

        // Yup, all seems to be right.
        return $data;
    }
protected function loadCache ( ) { if ( $ this -> isCacheValid ( ) === false ) { return null ; } $ data = null ; try { $ data = $ this -> cacheFile -> parse ( ) ; } catch ( ParseException $ e ) { // JSON is invalid, remove the file $ this -> invalidateCache ( ) ; } catch ( IOException $ e ) { $ part = Translator :: __ ( 'Try logging in with your ftp-client and make the file readable. ' . 'Else try to go <a>back</a> to the last page.' ) ; $ message = '<p>' . Translator :: __ ( 'general.phrase.file-not-readable-following-colon' ) . '</p>' . '<pre>' . htmlspecialchars ( $ this -> cacheFile -> getFullPath ( ) ) . '</pre>' . '<p>' . str_replace ( '<a>' , '<a href="javascript:history.go(-1)">' , $ part ) . '</p>' ; throw new RuntimeException ( Translator :: __ ( 'page.file-management.message.file-not-readable' . $ message ) , $ e -> getCode ( ) , $ e ) ; } // Check if we loaded actual data. if ( count ( $ data ) < 4 || empty ( $ data [ 'general' ] ) ) { return null ; } // Yup, all seems to be right. return $ data ; }
Attempt to load cached configuration files.

@throws RuntimeException

@return array|null
Attempt to load cached configuration files .