PHP Reader allows Configure to load configuration values from files containing simple PHP arrays.
Files compatible with PhpReader should define a
$config variable, that
contains all of the configuration data contained in the file.
- PhpReader implements ConfigReaderInterface
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
stringThe path this reader finds files on.
__construct() public ¶
__construct( string $path = null )
Constructor for PHP Config file reading.
- string $path optional null
- The path to read config files from. Defaults to APP . 'Config' . DS
read( string $key )
Read a config file and return its contents.
. in the name will be treated as values in plugins. Instead of reading from
the initialized path, plugin keys will be located using App::pluginPath().
- string $key
The identifier to read from. If the key has a . it will be treated as a plugin prefix.
Parsed configuration values.
when files don't exist or they don't contain
Or when files contain '..' as this could lead to abusive reads.