ConfigEngineInterface.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. * @since CakePHP(tm) v 1.0.0.2363
  13. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  14. */
  15. namespace Cake\Configure;
  16. /**
  17. * An interface for creating objects compatible with Configure::load()
  18. */
  19. interface ConfigEngineInterface {
  20. /**
  21. * Read method is used for reading configuration information from sources.
  22. * These sources can either be static resources like files, or dynamic ones like
  23. * a database, or other datasource.
  24. *
  25. * @param string $key
  26. * @return array An array of data to merge into the runtime configuration
  27. */
  28. public function read($key);
  29. /**
  30. * Dumps the configure data into source.
  31. *
  32. * @param string $key The identifier to write to.
  33. * @param array $data The data to dump.
  34. * @return boolean True on success or false on failure.
  35. */
  36. public function dump($key, $data);
  37. }