Welcome Guest, Not a member yet? Register   Sign In
explaining: $this->load->view();
#4

[eluser]adamp1[/eluser]
Thats a bit more difficult to explain. As you know there is a CI_Loader class in CodeIgniter. Well CodeIgniter loads this for you and saves the instance into the load property of the 'Core Object'.

When you create a controller you always extend Controller and call the parent constructor. By doing this it means this 'Core Object' is available to you in your class by using $this. So in you controller you can now do calls to $this->load. As since we have the CI_Loader class in the load property we can call it as well. $this->load->view();


Messages In This Thread
explaining: $this->load->view(); - by El Forum - 04-09-2010, 09:37 PM
explaining: $this->load->view(); - by El Forum - 04-09-2010, 10:17 PM
explaining: $this->load->view(); - by El Forum - 04-09-2010, 10:48 PM
explaining: $this->load->view(); - by El Forum - 04-10-2010, 12:39 AM
explaining: $this->load->view(); - by El Forum - 04-10-2010, 12:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB