![]() |
Where is this member variable of CI_Controller declared - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Where is this member variable of CI_Controller declared (/showthread.php?tid=43043) |
Where is this member variable of CI_Controller declared - El Forum - 06-28-2011 [eluser]Crusoe[/eluser] Code: class Welcome extends CI_Controller { 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 { It does not have a member variable called load. So, where did load come from ? Where is this member variable of CI_Controller declared - El Forum - 06-28-2011 [eluser]wiredesignz[/eluser] Code: $this->load =& load_class('Loader', 'core'); Where is this member variable of CI_Controller declared - El Forum - 06-28-2011 [eluser]InsiteFX[/eluser] Did you look at the CI Loader Class? InsiteFX Where is this member variable of CI_Controller declared - El Forum - 06-28-2011 [eluser]Crusoe[/eluser] OK, I guessed as much. But, why not simply declare the instance variables in the base class ? Any specific reason for doing it this way ? BTW, how does one find out what are the members and methods of CI_Controller and CI_Model ? Is it listed somewhere in the documentation ? |