Base for a static organization website

ConfigReaderInterface.php 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * For full copyright and license information, please see the LICENSE.txt
  8. * Redistributions of files must retain the above copyright notice.
  9. *
  10. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. * @link http://cakephp.org CakePHP(tm) Project
  12. * @package Cake.Core
  13. * @since CakePHP(tm) v 1.0.0.2363
  14. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  15. */
  16. /**
  17. * An interface for creating objects compatible with Configure::load()
  18. *
  19. * @package Cake.Core
  20. */
  21. interface ConfigReaderInterface {
  22. /**
  23. * Read method is used for reading configuration information from sources.
  24. * These sources can either be static resources like files, or dynamic ones like
  25. * a database, or other datasource.
  26. *
  27. * @param string $key Key to read.
  28. * @return array An array of data to merge into the runtime configuration
  29. */
  30. public function read($key);
  31. /**
  32. * Dumps the configure data into source.
  33. *
  34. * @param string $key The identifier to write to.
  35. * @param array $data The data to dump.
  36. * @return bool True on success or false on failure.
  37. */
  38. public function dump($key, $data);
  39. }