Welcome Guest, Not a member yet? Register   Sign In
Extending a controller with __construct not working
#6

[eluser]theprodigy[/eluser]
if the child class is calling
Code:
parent::__construct();

then the constructor of the parent needs to be in __construct() format, not { className }() format (as far as I know).

If you change your child to call
Code:
parent::__construct();
Change the name of your constructor in main to
Code:
public function __construct()

Try making all your constructors (from children controllers on up to -and including- main)
Code:
public function __construct(){
    parent::__construct();
}


Messages In This Thread
Extending a controller with __construct not working - by El Forum - 12-21-2009, 10:40 AM
Extending a controller with __construct not working - by El Forum - 12-21-2009, 11:58 AM
Extending a controller with __construct not working - by El Forum - 12-21-2009, 01:50 PM
Extending a controller with __construct not working - by El Forum - 12-21-2009, 02:12 PM
Extending a controller with __construct not working - by El Forum - 12-21-2009, 07:47 PM
Extending a controller with __construct not working - by El Forum - 12-21-2009, 09:54 PM
Extending a controller with __construct not working - by El Forum - 12-22-2009, 12:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB