summaryrefslogtreecommitdiffstats
path: root/system/core/Loader.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-08-13 18:31:49 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-08-13 18:31:49 +0200
commitadd9ca05c17e5bfd17ded6a65b1a084f7da5d633 (patch)
tree106585c663c32f3155a20a6d41279f2fa9f2a4aa /system/core/Loader.php
parent3cf2715501be298ef00166d57a4df39829aa2c09 (diff)
parent6cf190dcd68432a5bcea91bfc10a38b3f56e7f46 (diff)
Merged my GitHub mirror.
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r--system/core/Loader.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 18024242e..a0fbaa82e 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -62,17 +62,22 @@ class CI_Loader {
// --------------------------------------------------------------------
/**
- * Set _base_classes variable
+ * Initialize the Loader
*
* This method is called once in CI_Controller.
*
* @param array
* @return object
*/
- public function set_base_classes()
+ 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;
}
@@ -1020,23 +1025,19 @@ class CI_Loader {
* The config/autoload.php file contains an array that permits sub-systems,
* libraries, and helpers to be loaded automatically.
*
- * This function is public, as it's used in the CI_Controller class.
- * However, there is no reason you should ever needs to use it.
- *
* @param array
* @return void
*/
- public function ci_autoloader()
+ private function _ci_autoloader()
{
if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload.php'))
{
- include_once(APPPATH.'config/'.ENVIRONMENT.'/autoload.php');
+ include(APPPATH.'config/'.ENVIRONMENT.'/autoload.php');
}
else
{
- include_once(APPPATH.'config/autoload.php');
+ include(APPPATH.'config/autoload.php');
}
-
if ( ! isset($autoload))
{