summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-02 23:35:48 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-02 23:35:48 +0100
commit679525d0237ac2e0a94d7b05377eb31eb3398f19 (patch)
treedcd86b3cdb00e35f451d26bb3023f7a501b57455 /system/core
parent38e32f643492a7bf0233bb9848138d183fbdfcd4 (diff)
Removed CI_Loader::initialize() and moved its logic to the constructor.
That method used to be called by the CI_Controller constructor and was required because of the possibility to instantiate the Controller class twice due to 404_override, and so some properties needed to be reset. Following the last commit - this is no longer the case.
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Controller.php1
-rw-r--r--system/core/Loader.php28
2 files changed, 6 insertions, 23 deletions
diff --git a/system/core/Controller.php b/system/core/Controller.php
index ee6fec8d5..cbdf0515f 100644
--- a/system/core/Controller.php
+++ b/system/core/Controller.php
@@ -65,7 +65,6 @@ 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 e9d03482f..2a78f4153 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -130,8 +130,10 @@ class CI_Loader {
/**
* Class constructor
*
- * Sets component load paths gets the initial output buffering level.
+ * Sets component load paths, gets the initial output buffering level
+ * and calls the autoloader.
*
+ * @uses CI_Loader::_ci_autoloader()
* @return void
*/
public function __construct()
@@ -141,28 +143,10 @@ class CI_Loader {
$this->_ci_helper_paths = array(APPPATH, BASEPATH);
$this->_ci_model_paths = array(APPPATH);
$this->_ci_view_paths = array(VIEWPATH => TRUE);
-
- log_message('debug', 'Loader Class Initialized');
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Initialize the Loader
- *
- * @used-by CI_Controller
- * @uses CI_Loader::_ci_autoloader()
- * @return object $this
- */
- public function initialize()
- {
- $this->_ci_classes = array();
- $this->_ci_loaded_files = array();
- $this->_ci_models = array();
$this->_base_classes =& is_loaded();
-
$this->_ci_autoloader();
- return $this;
+
+ log_message('debug', 'Loader Class Initialized');
}
// --------------------------------------------------------------------
@@ -1150,7 +1134,7 @@ class CI_Loader {
*
* Loads component listed in the config/autoload.php file.
*
- * @used-by CI_Loader::initialize()
+ * @used-by CI_Loader::__construct()
* @return void
*/
protected function _ci_autoloader()