diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index b09faa2f4..4aa3478ae 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -20,9 +20,9 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Router', 'Core'); +App::uses('Router', 'Routing'); App::uses('Security', 'Core'); -App::uses('Debugger', 'Core'); +App::uses('Debugger', 'Utility'); /** * Authentication control component class diff --git a/cake/libs/controller/component_collection.php b/lib/Cake/Controller/ComponentCollection.php similarity index 100% rename from cake/libs/controller/component_collection.php rename to lib/Cake/Controller/ComponentCollection.php diff --git a/cake/libs/controller/controller.php b/lib/Cake/Controller/Controller.php similarity index 100% rename from cake/libs/controller/controller.php rename to lib/Cake/Controller/Controller.php diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 5caf05e40..a363ad407 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -629,9 +629,7 @@ class App { } if (!isset(self::$__paths[$path])) { - if (!class_exists('Folder')) { - require LIBS . 'folder.php'; - } + App::uses('Folder', 'Utility'); $Folder = new Folder(); $directories = $Folder->tree($path, array('.svn', '.git', 'CVS', 'tests', 'templates'), 'dir'); sort($directories); @@ -865,9 +863,7 @@ class App { * @return array List of directories or files in directory */ private static function __list($path, $suffix = false, $extension = false) { - if (!class_exists('Folder')) { - require LIBS . 'folder.php'; - } + App::uses('Folder', 'Utility'); $items = array(); $Folder = new Folder($path); $contents = $Folder->read(false, true); diff --git a/cake/libs/object.php b/lib/Cake/Core/Object.php similarity index 100% rename from cake/libs/object.php rename to lib/Cake/Core/Object.php diff --git a/lib/Cake/Error/ErrorHandler.php b/lib/Cake/Error/ErrorHandler.php index 85cea7ec4..732b6328d 100644 --- a/lib/Cake/Error/ErrorHandler.php +++ b/lib/Cake/Error/ErrorHandler.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Debugger', 'Utility'); + /** * * Error Handler provides basic error and exception handling for your application. It captures and @@ -143,9 +145,6 @@ class ErrorHandler { $debug = Configure::read('debug'); if ($debug) { - if (!class_exists('Debugger')) { - require LIBS . 'debugger.php'; - } $data = array( 'level' => $log, 'code' => $code, @@ -164,9 +163,6 @@ class ErrorHandler { } $message = $error . ' (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']'; if (!empty($errorConfig['trace'])) { - if (!class_exists('Debugger')) { - require LIBS . 'debugger.php'; - } $trace = Debugger::trace(array('start' => 1, 'format' => 'log')); $message .= "\nTrace:\n" . $trace . "\n"; } diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index d1c396148..1fd36319c 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -30,7 +30,7 @@ App::uses('CakeResponse', 'Network'); App::uses('Controller', 'Controller'); App::uses('Scaffold', 'Controller'); App::uses('View', 'View'); -App::uses('Debugger', 'Core'); +App::uses('Debugger', 'Utility'); /** * Dispatcher converts Requests into controller actions. It uses the dispatched Request diff --git a/cake/libs/route/cake_route.php b/lib/Cake/Routing/Route/CakeRoute.php similarity index 100% rename from cake/libs/route/cake_route.php rename to lib/Cake/Routing/Route/CakeRoute.php diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 340d04261..3824fdd0c 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -18,8 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('CakeRequest', 'Core'); -App::uses('CakeRoute', 'Core'); +App::uses('CakeRequest', 'Network'); +App::uses('CakeRoute', 'Routing/Route'); /** * Parses the request URL into controller, action, and parameters. diff --git a/cake/libs/debugger.php b/lib/Cake/Utility/Debugger.php similarity index 99% rename from cake/libs/debugger.php rename to lib/Cake/Utility/Debugger.php index a6f060df7..d1900500a 100644 --- a/cake/libs/debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -24,8 +24,8 @@ * Included libraries. * */ -App::uses('CakeLog', 'Core'); -App::uses('String', 'Core'); +App::uses('CakeLog', 'Log'); +App::uses('String', 'Utility'); /** * Provide custom logging and error handling. diff --git a/cake/libs/string.php b/lib/Cake/Utility/String.php similarity index 100% rename from cake/libs/string.php rename to lib/Cake/Utility/String.php diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 93532e608..1e649440e 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -225,14 +225,7 @@ require LIBS . 'Error' . DS . 'exceptions.php'; App::uses('ErrorHandler', 'Error'); App::uses('Configure', 'Core'); App::uses('Cache', 'Cache'); - - - -//require LIBS . 'object.php'; -//require LIBS . 'configure.php'; -//require LIBS . 'set.php'; -//require LIBS . 'cache.php'; -//require LIBS . 'error' . DS . 'error_handler.php'; +App::uses('Object', 'Core'); Configure::bootstrap(isset($boot) ? $boot : true);