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

(04-17-2017, 04:37 PM)daveĀ friend Wrote: But, if MY_Controller does not mess with any CI_Controller properties (and it only has one - private static $instance; so there is nothing to mess with) then technically he does not need to explicitly call the base class constructor. PHP will do it anyway.

That is true, but in that case the MY_Controller class may not have a __construct() method. If it does have a __construct() method you MUST call the parent::_construct manually.

So the question is:
Does @gbwebapps have an empty constructor in his MY_Controller class?
Reply


Messages In This Thread
RE: Clarification about MY_Controller and relative inheritances - by Martin7483 - 04-18-2017, 01:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB