Welcome Guest, Not a member yet? Register   Sign In
Extending Controller
#1

[eluser]HooJee[/eluser]
Hi Guys

I have created an extension of the Controller class called Parent_Controller, but everytime I try to access it via another controller I keep getting a 'Parent_Controller not found'. Code below:

Code:
class Parent_Controller extends Controller {
    function Parent_Controller() {
        parent::Controller();
        $this->_check_session();
    }
    
    function _check_session() {
    }    
}

Code:
class Projects extends Parent_Controller {
    
    function Projects() {
        parent::Parent_Controller();
        // LOAD MODEL
        $this->load->model('Projectsmodel');
    }
}

Code:
Fatal error: Class 'Parent_Controller' not found in C:\wamp\www\personal\system\application\controllers\admin\home.php on line 4


Messages In This Thread
Extending Controller - by El Forum - 08-05-2009, 06:28 PM
Extending Controller - by El Forum - 08-05-2009, 06:32 PM
Extending Controller - by El Forum - 08-05-2009, 09:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB