Skip to content

Commit

Permalink
Splitting ConfigReaderInterface out into a separate file.
Browse files Browse the repository at this point in the history
Refs #2514
  • Loading branch information
markstory committed Jan 29, 2012
1 parent b905316 commit 1600322
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
31 changes: 31 additions & 0 deletions lib/Cake/Configure/ConfigReaderInterface.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);
}
21 changes: 1 addition & 20 deletions lib/Cake/Core/Configure.php
@@ -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)
*
Expand All @@ -18,6 +14,7 @@
*/

App::uses('Set', 'Utility');
App::uses('ConfigReaderInterface', 'Configure');

/**
* Configuration class. Used for managing runtime configuration information.
Expand Down Expand Up @@ -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.