From 0c9ee4a348a9e0c9ee6d6c0085e463e098e453f4 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Wed, 20 Apr 2011 09:40:17 -0500 Subject: Refactoring the loader to set protected class variables. Moved _ci_autoload(), which is used in CI_Controller to be a public method. Also added CI_Loader::set_base_classes() to be called in the controller so we're not setting protected vars in another class. Also refactored in the form_helper so it's not trying to access protected vars in CI_Loader. Added the is_loaded() method to the loader to take care of the checks that were being done there. --- system/core/Controller.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'system/core/Controller.php') diff --git a/system/core/Controller.php b/system/core/Controller.php index fd9c8b580..ec86b7920 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -48,12 +48,9 @@ class CI_Controller { $this->load =& load_class('Loader', 'core'); - $this->load->_base_classes =& is_loaded(); - - $this->load->ci_autoloader(); - + $this->load->set_base_classes()->ci_autoloader(); + log_message('debug', "Controller Class Initialized"); - } public static function &get_instance() -- cgit v1.2.3-24-g4f1b