Skip to content
Permalink
Browse files

Splitting ConfigReaderInterface out into a separate file.

Refs #2514
  • Loading branch information...
markstory committed Jan 29, 2012
1 parent b905316 commit 1600322a54edd1841117b955aac2d76932bd614f
Showing with 32 additions and 20 deletions.
  1. +31 −0 lib/Cake/Configure/ConfigReaderInterface.php
  2. +1 −20 lib/Cake/Core/Configure.php
@@ -0,0 +1,31 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Core
* @since CakePHP(tm) v 1.0.0.2363
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* An interface for creating objects compatible with Configure::load()
*
* @package Cake.Core
*/
interface ConfigReaderInterface {
/**
* 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.
*
* @param string $key
* @return array An array of data to merge into the runtime configuration
*/
public function read($key);
}
@@ -1,9 +1,5 @@
<?php
/**
* Configure class
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
@@ -18,6 +14,7 @@
*/
App::uses('Set', 'Utility');
App::uses('ConfigReaderInterface', 'Configure');
/**
* Configuration class. Used for managing runtime configuration information.
@@ -340,19 +337,3 @@ public static function restore($name, $cacheConfig = 'default') {
}
}
/**
* An interface for creating objects compatible with Configure::load()
*
* @package Cake.Core
*/
interface ConfigReaderInterface {
/**
* 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.
*
* @param string $key
* @return array An array of data to merge into the runtime configuration
*/
public function read($key);
}

0 comments on commit 1600322

Please sign in to comment.
You can’t perform that action at this time.