Moving more classes to the new schema, slowly uncommenting code and implementing new class loader

This commit is contained in:
José Lorenzo Rodríguez 2010-12-03 20:53:47 -04:30
parent ca34b22dbb
commit 3c23080dd2
6 changed files with 16 additions and 9 deletions

View file

@ -442,7 +442,10 @@ class App {
public static function load($className) { public static function load($className) {
if (isset(self::$__classMap[$className])) { if (isset(self::$__classMap[$className])) {
return App::import(self::$__classMap[$className], $className, false); $file = LIBS . self::$__classMap[$className] . DS . $className . '.php';
if (file_exists($file)) {
return include $file;
}
} }
return false; return false;
} }
@ -606,7 +609,7 @@ class App {
} }
if (empty(self::$__paths)) { if (empty(self::$__paths)) {
self::$__paths = Cache::read('dir_map', '_cake_core_'); //self::$__paths = Cache::read('dir_map', '_cake_core_');
} }
foreach (self::$search as $path) { foreach (self::$search as $path) {

View file

@ -24,9 +24,9 @@
/** /**
* List of helpers to include * List of helpers to include
*/ */
App::uses('Router', 'Core'); App::uses('Router', 'Routing');
App::uses('CakeRequest', 'Core'); App::uses('CakeRequest', 'Network');
App::uses('CakeResponse', 'Core'); App::uses('CakeResponse', 'Network');
App::uses('Controller', 'Controller'); App::uses('Controller', 'Controller');
App::uses('Scaffold', 'Controller'); App::uses('Scaffold', 'Controller');
App::uses('View', 'View'); App::uses('View', 'View');

View file

@ -219,17 +219,21 @@ if (!defined('JS_URL')) {
require LIBS . 'basics.php'; require LIBS . 'basics.php';
require LIBS . 'app.php'; require LIBS . 'Utility' . DS . 'Inflector.php';
require LIBS . 'Utility' . DS . 'Folder.php';
require LIBS . 'Core' . DS .'App.php';
App::uses('Configure', 'Core');
App::uses('Cache', 'Cache');
//require LIBS . 'error' . DS . 'exceptions.php'; //require LIBS . 'error' . DS . 'exceptions.php';
//require LIBS . 'object.php'; //require LIBS . 'object.php';
//require LIBS . 'inflector.php';
//
//require LIBS . 'configure.php'; //require LIBS . 'configure.php';
//require LIBS . 'set.php'; //require LIBS . 'set.php';
//require LIBS . 'cache.php'; //require LIBS . 'cache.php';
//require LIBS . 'error' . DS . 'error_handler.php'; //require LIBS . 'error' . DS . 'error_handler.php';
//Configure::bootstrap(isset($boot) ? $boot : true); Configure::bootstrap(isset($boot) ? $boot : true);
/** /**
* Full url prefix * Full url prefix