intController() and __construct() |
07-30-2018, 01:26 PM
(This post was last modified: 07-30-2018, 08:17 PM by enlivenapp. Edit Reason: Spelling and make the first line easier to figure out what I'm asking about )
I'd like to make sure I have my head wrapped around the removal no longer need of __contruct() from controllers to construct the parent.
I I've got that PHP Code: public function __construct() specifically is no longer needed as intController() takes care of all that. So, where I'm a bit fuzzy is this: When I need/want to initialize a controller wide access to a resource, IE: (shortened for brevity), The "old way" PHP Code: <?php namespace App\Controllers; Is this still valid to set up a controller-wide available resource? or should we be using these in each method when we need them and not use __construct() at all? IE: PHP Code: <?php namespace App\Controllers; I realize using database and builder is open to 'the fat/skinny controller/model argument', this is just an example to ask my question... |
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 __consturct() - by enlivenapp - 07-30-2018, 02:29 PM
RE: intController() and __consturct() - by kilishan - 07-30-2018, 07:16 PM
RE: intController() and __construct() - by dgvirtual - 05-22-2022, 12:20 AM
RE: intController() and __construct() - by kenjis - 05-22-2022, 02:43 AM
RE: intController() and __construct() - by dgvirtual - 05-22-2022, 11:15 AM
|