Welcome Guest, Not a member yet? Register   Sign In
intController() and __construct()
#2

You're overthinking it Smile

Yes - it's perfectly valid to do controller-wide resources.

Just forget the initController() exists and you'll be fine. That's used by the framework, not by you. It just makes it a little simpler/cleaner when you want to create controller-wide resources. Instead of:

Code:
public function__construct(...$params)
{
    parent::__construct(...$params);

    // Your stuff goes here...
}

You would do:

Code:
public function__construct()
{
    // Your stuff goes here...
}
Reply


Messages In This Thread
intController() and __construct() - by enlivenapp - 07-30-2018, 01:26 PM
RE: intController() and __consturct() - by kilishan - 07-30-2018, 02:13 PM
RE: intController() and __construct() - by kenjis - 05-22-2022, 02:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB