[eluser]Crusoe[/eluser]
Code:
class Welcome extends CI_Controller {
public function index() {
$this->load->view('welcome_message');
}
}
If we are able to call $this->load->view successfully either the class Welcome or it's parent CI_Controller should have a member variable called load. I looked for it in the class definition.
Code:
class CI_Controller {
private static $instance;
public function __construct(){
self::$instance =& $this;
foreach (is_loaded() as $var => $class) {
$this->$var =& load_class($class);
}
$this->load =& load_class('Loader', 'core');
$this->load->_base_classes =& is_loaded();
$this->load->_ci_autoloader();
log_message('debug', "Controller Class Initialized");
}
public static function &get;_instance(){
return self::$instance;
}
}
It does not have a member variable called load. So, where did load come from ?