06-13-2009, 07:15 PM
[eluser]theprodigy[/eluser]
the constructor of the extended class calls the parent's construtor.
I thought that was mandatory which is why I didn't specify it. The constructor of MY_Controller calls the Controller() constructor and loads the resources, the constructor of the extended class calls the constructor of MY_Controller, but for some reason, the resources aren't being able to be used by the extender. Do I need to assign the resources to a class level variable, and use them that way?
Is that what I need to do in order to use them in the extender?
the constructor of the extended class calls the parent's construtor.
Code:
class Galleries extends MY_Controller {
function Galleries()
{
parent::MY_Controller();
$this->load->model('MGalleryAdmin');
$this->data['menu_active'] = 0;
}
I thought that was mandatory which is why I didn't specify it. The constructor of MY_Controller calls the Controller() constructor and loads the resources, the constructor of the extended class calls the constructor of MY_Controller, but for some reason, the resources aren't being able to be used by the extender. Do I need to assign the resources to a class level variable, and use them that way?
Code:
$this->form_val = $this->load->library('form_validation');
Is that what I need to do in order to use them in the extender?