2012-01-29 18:30:05 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2017-06-10 21:33:55 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
2017-06-10 22:10:52 +00:00
|
|
|
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
2012-01-29 18:30:05 +00:00
|
|
|
*
|
|
|
|
* Licensed under The MIT License
|
2013-02-08 12:22:51 +00:00
|
|
|
* For full copyright and license information, please see the LICENSE.txt
|
2012-01-29 18:30:05 +00:00
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
2017-06-10 22:10:52 +00:00
|
|
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
2017-06-10 21:33:55 +00:00
|
|
|
* @link https://cakephp.org CakePHP(tm) Project
|
2012-01-29 18:30:05 +00:00
|
|
|
* @package Cake.Core
|
|
|
|
* @since CakePHP(tm) v 1.0.0.2363
|
2017-06-10 22:23:14 +00:00
|
|
|
* @license https://opensource.org/licenses/mit-license.php MIT License
|
2012-01-29 18:30:05 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An interface for creating objects compatible with Configure::load()
|
|
|
|
*
|
|
|
|
* @package Cake.Core
|
|
|
|
*/
|
|
|
|
interface ConfigReaderInterface {
|
2012-03-03 22:36:59 +00:00
|
|
|
|
2012-01-29 18:30:05 +00:00
|
|
|
/**
|
|
|
|
* Read method is used for reading configuration information from sources.
|
|
|
|
* These sources can either be static resources like files, or dynamic ones like
|
|
|
|
* a database, or other datasource.
|
|
|
|
*
|
2014-06-02 12:57:11 +00:00
|
|
|
* @param string $key Key to read.
|
2012-01-29 18:30:05 +00:00
|
|
|
* @return array An array of data to merge into the runtime configuration
|
|
|
|
*/
|
|
|
|
public function read($key);
|
2012-03-03 22:36:59 +00:00
|
|
|
|
2012-11-18 14:57:58 +00:00
|
|
|
/**
|
|
|
|
* Dumps the configure data into source.
|
|
|
|
*
|
|
|
|
* @param string $key The identifier to write to.
|
|
|
|
* @param array $data The data to dump.
|
2014-07-03 13:36:42 +00:00
|
|
|
* @return bool True on success or false on failure.
|
2012-11-18 14:57:58 +00:00
|
|
|
*/
|
|
|
|
public function dump($key, $data);
|
|
|
|
|
2012-01-29 18:30:05 +00:00
|
|
|
}
|