private function loadConfigFile($configFile)
    {
        if ($this->useCache) {
            if (function_exists('apc_fetch')) {
                $config = apc_fetch($configFile);
            } elseif (function_exists('apcu_fetch')) {
                $config = apcu_fetch($configFile);
            }

            if (!empty($config)) {
                return $config;
            }
        }

        if (!is_readable($configFile)) {
            throw new FileNotFoundException("File $configFile could not be found.");
        }

        try {
            $config = $this->parser->parse(file_get_contents($configFile));
        } catch (ParseException $e) {
            $line = $e->getParsedLine();
            throw new InvalidConfigFileException(
                "File $configFile does not have a valid format (line $line)"
            );
        }

        if ($this->useCache) {
            if (function_exists('apc_store')) {
                apc_store($configFile, $config);
            } elseif (function_exists('apcu_store')) {
                apcu_store($configFile, $config);
            }
        }

        return $config;
    }
private function loadConfigFile($configFile)
    {
        if ($this->useCache) {
            if (function_exists('apc_fetch')) {
                $config = apc_fetch($configFile);
            } elseif (function_exists('apcu_fetch')) {
                $config = apcu_fetch($configFile);
            }

            if (!empty($config)) {
                return $config;
            }
        }

        if (!is_readable($configFile)) {
            throw new FileNotFoundException("File $configFile could not be found.");
        }

        try {
            $config = $this->parser->parse(file_get_contents($configFile));
        } catch (ParseException $e) {
            $line = $e->getParsedLine();
            throw new InvalidConfigFileException(
                "File $configFile does not have a valid format (line $line)"
            );
        }

        if ($this->useCache) {
            if (function_exists('apc_store')) {
                apc_store($configFile, $config);
            } elseif (function_exists('apcu_store')) {
                apcu_store($configFile, $config);
            }
        }

        return $config;
    }
private function loadConfigFile ( $ configFile ) { if ( $ this -> useCache ) { if ( function_exists ( 'apc_fetch' ) ) { $ config = apc_fetch ( $ configFile ) ; } elseif ( function_exists ( 'apcu_fetch' ) ) { $ config = apcu_fetch ( $ configFile ) ; } if ( ! empty ( $ config ) ) { return $ config ; } } if ( ! is_readable ( $ configFile ) ) { throw new FileNotFoundException ( "File $configFile could not be found." ) ; } try { $ config = $ this -> parser -> parse ( file_get_contents ( $ configFile ) ) ; } catch ( ParseException $ e ) { $ line = $ e -> getParsedLine ( ) ; throw new InvalidConfigFileException ( "File $configFile does not have a valid format (line $line)" ) ; } if ( $ this -> useCache ) { if ( function_exists ( 'apc_store' ) ) { apc_store ( $ configFile , $ config ) ; } elseif ( function_exists ( 'apcu_store' ) ) { apcu_store ( $ configFile , $ config ) ; } } return $ config ; }
Loads a config file into config property. If cache is used, first check if the config
file was previously loaded.
@throws FileNotFoundException
@throws InvalidConfigFileException
Loads a config file into config property . If cache is used first check if the config file was previously loaded .