mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Moving more classes to the new schema, slowly uncommenting code and implementing new class loader
This commit is contained in:
parent
ca34b22dbb
commit
3c23080dd2
6 changed files with 16 additions and 9 deletions
|
@ -442,7 +442,10 @@ class App {
|
|||
|
||||
public static function load($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;
|
||||
}
|
||||
|
@ -606,7 +609,7 @@ class App {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
/**
|
||||
* List of helpers to include
|
||||
*/
|
||||
App::uses('Router', 'Core');
|
||||
App::uses('CakeRequest', 'Core');
|
||||
App::uses('CakeResponse', 'Core');
|
||||
App::uses('Router', 'Routing');
|
||||
App::uses('CakeRequest', 'Network');
|
||||
App::uses('CakeResponse', 'Network');
|
||||
App::uses('Controller', 'Controller');
|
||||
App::uses('Scaffold', 'Controller');
|
||||
App::uses('View', 'View');
|
||||
|
|
|
@ -219,17 +219,21 @@ if (!defined('JS_URL')) {
|
|||
|
||||
|
||||
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 . 'object.php';
|
||||
//require LIBS . 'inflector.php';
|
||||
//
|
||||
//require LIBS . 'configure.php';
|
||||
//require LIBS . 'set.php';
|
||||
//require LIBS . 'cache.php';
|
||||
//require LIBS . 'error' . DS . 'error_handler.php';
|
||||
|
||||
//Configure::bootstrap(isset($boot) ? $boot : true);
|
||||
Configure::bootstrap(isset($boot) ? $boot : true);
|
||||
|
||||
/**
|
||||
* Full url prefix
|
||||
|
|
Loading…
Reference in a new issue