Welcome Guest, Not a member yet? Register   Sign In
Clarification about MY_Controller and relative inheritances
#7

(This post was last modified: 04-17-2017, 04:38 PM by marksman.)

@Dave friend, have you tried to var_dump in Backend_Controller's constructor? I'm afraid its not loaded. or try to instantiate it in your class Dashboard which is basically loaded by magic router.

PHP Code:
class Dashboard extends MY_Controller
{
    public function 
index()
    {
        
// If this returns an error then your Backend_Controller is not loaded
        
$oBackend = new Backend_Controller();
    }


You extend My_Controller to CI_Controller while Backend_Controller extends MY_Controller. I think you missed it my friend. No one extends or instantiate Backend_Controller so no chance to access it's instance, your Dashboard also extends to MY_Controller. In your structure MY_Controller stands as your base class neither Backend_Controller nor Frontend_Controller. That's why.
God Bless CI Contributors Smile
Reply


Messages In This Thread
RE: Clarification about MY_Controller and relative inheritances - by marksman - 04-17-2017, 04:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB