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.
__construct( string $path null )
Constructor for PHP Config file reading.
$path
optional null _getFilePath( string $key )
Get file path
$key
string
dump( string $key , array $data )
Converts the provided $data into a string of PHP code that can be used saved into a file and loaded later.
$key
$data
integer
ConfigReaderInterface::dump()
read( string $key )
Read a config file and return its contents.
Files with .
in the name will be treated as values in plugins. Instead of reading from the initialized path, plugin keys will be located using CakePlugin::path().
$key
array
ConfigureException
$config
. Or when files contain '..' as this could lead to abusive reads.ConfigReaderInterface::read()
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.7/class-PhpReader.html