diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-11-03 17:09:01 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-11-03 17:09:01 +0100 |
commit | cdac248e9cf7a8ea3ed426f189bb52254800bc2a (patch) | |
tree | 9a3c9cbb5fe2761c2c9469c861b95414eb9e3151 /system/core | |
parent | 28daadeca8ebc889fd799ed8bb58293ebeb4fabd (diff) |
It appears to break get_instance()->*_package_path*() usage which is very common.
Need to figure out how to resolve this.
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Controller.php | 1 | ||||
-rw-r--r-- | system/core/Loader.php | 25 |
2 files changed, 20 insertions, 6 deletions
diff --git a/system/core/Controller.php b/system/core/Controller.php index cbdf0515f..ee6fec8d5 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -65,6 +65,7 @@ class CI_Controller { } $this->load =& load_class('Loader', 'core'); + $this->load->initialize(); log_message('debug', 'Controller Class Initialized'); } diff --git a/system/core/Loader.php b/system/core/Loader.php index 2a78f4153..88fbdb6e1 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -130,10 +130,8 @@ class CI_Loader { /** * Class constructor * - * Sets component load paths, gets the initial output buffering level - * and calls the autoloader. + * Sets component load paths, gets the initial output buffering level. * - * @uses CI_Loader::_ci_autoloader() * @return void */ public function __construct() @@ -143,8 +141,6 @@ class CI_Loader { $this->_ci_helper_paths = array(APPPATH, BASEPATH); $this->_ci_model_paths = array(APPPATH); $this->_ci_view_paths = array(VIEWPATH => TRUE); - $this->_base_classes =& is_loaded(); - $this->_ci_autoloader(); log_message('debug', 'Loader Class Initialized'); } @@ -152,6 +148,23 @@ class CI_Loader { // -------------------------------------------------------------------- /** + * Initializer + * + * @todo Figure out a way to move this to the constructor + * without breaking *package_path*() methods. + * @uses CI_Loader::_ci_autoloader() + * @used-by CI_Controller::__construct() + * @return void + */ + public function initialize() + { + $this->_base_classes =& is_loaded(); + $this->_ci_autoloader(); + } + + // -------------------------------------------------------------------- + + /** * Is Loaded * * A utility method to test if a class is in the self::$_ci_classes array. @@ -1134,7 +1147,7 @@ class CI_Loader { * * Loads component listed in the config/autoload.php file. * - * @used-by CI_Loader::__construct() + * @used-by CI_Loader::initialize() * @return void */ protected function _ci_autoloader() |