Welcome Guest, Not a member yet? Register   Sign In
MY_Controller and resources
#3

[eluser]theprodigy[/eluser]
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?


Messages In This Thread
MY_Controller and resources - by El Forum - 06-13-2009, 07:05 PM
MY_Controller and resources - by El Forum - 06-13-2009, 07:10 PM
MY_Controller and resources - by El Forum - 06-13-2009, 07:15 PM
MY_Controller and resources - by El Forum - 06-13-2009, 07:22 PM
MY_Controller and resources - by El Forum - 06-13-2009, 07:24 PM
MY_Controller and resources - by El Forum - 06-13-2009, 07:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB