diff --git a/lib/Cake/Configure/ConfigReaderInterface.php b/lib/Cake/Configure/ConfigReaderInterface.php index f1373550519..512ddf55ea2 100644 --- a/lib/Cake/Configure/ConfigReaderInterface.php +++ b/lib/Cake/Configure/ConfigReaderInterface.php @@ -12,6 +12,7 @@ * @since CakePHP(tm) v 1.0.0.2363 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +namespace Cake\Configure; /** * An interface for creating objects compatible with Configure::load() diff --git a/lib/Cake/Configure/IniReader.php b/lib/Cake/Configure/IniReader.php index debd685c617..d663066ba7a 100644 --- a/lib/Cake/Configure/IniReader.php +++ b/lib/Cake/Configure/IniReader.php @@ -16,7 +16,10 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Hash', 'Utility'); + +namespace Cake\Configure; +use Cake\Utility\Hash, + Cake\Error; /** * Ini file configuration engine. @@ -94,7 +97,7 @@ public function read($file) { if (!file_exists($filename)) { $filename .= '.ini'; if (!file_exists($filename)) { - throw new ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', substr($filename, 0, -4), $filename)); + throw new Error\ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', substr($filename, 0, -4), $filename)); } } $contents = parse_ini_file($filename, true); diff --git a/lib/Cake/Configure/PhpReader.php b/lib/Cake/Configure/PhpReader.php index f5d96196135..f7b037ebc08 100644 --- a/lib/Cake/Configure/PhpReader.php +++ b/lib/Cake/Configure/PhpReader.php @@ -15,6 +15,9 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +namespace Cake\Configure; +use Cake\Core\App, + Cake\Error; /** * PHP Reader allows Configure to load configuration values from @@ -60,7 +63,7 @@ public function __construct($path = null) { */ public function read($key) { if (strpos($key, '..') !== false) { - throw new ConfigureException(__d('cake_dev', 'Cannot load configuration files with ../ in them.')); + throw new Error\ConfigureException(__d('cake_dev', 'Cannot load configuration files with ../ in them.')); } if (substr($key, -4) === '.php') { $key = substr($key, 0, -4); @@ -75,12 +78,12 @@ public function read($key) { $file .= '.php'; if (!is_file($file)) { if (!is_file(substr($file, 0, -4))) { - throw new ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', $file, substr($file, 0, -4))); + throw new Error\ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', $file, substr($file, 0, -4))); } } include $file; if (!isset($config)) { - throw new ConfigureException( + throw new Error\ConfigureException( sprintf(__d('cake_dev', 'No variable $config found in %s.php'), $file) ); }