![]() |
InitController and phpstorm navigation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: InitController and phpstorm navigation (/showthread.php?tid=86854) |
InitController and phpstorm navigation - Kris40 - 02-21-2023 Hello, I'm using the new constructor initController instead of the php __construct, but i have some problems to navigate through the models with phpstorm : With the old __construct, doing this : public $my_model; function __construct() { $this->my_model = model('\App\Models\my_model'); } i could navigate through the models Replacing with the new initcontroller make navigation impossible. I tried using phpdoc tags @var \App\Models\my_model but no effects Does someone have the same problems ? Best regards RE: InitController and phpstorm navigation - Kris40 - 02-25-2023 (02-21-2023, 02:49 AM)Finaly i solved my problem by just adding the missing type :public '\App\Models\my_model' $my_model;now phpstorm can navigate through the modelsKris40 Wrote: Hello, RE: InitController and phpstorm navigation - kenjis - 02-25-2023 This works. But it may be better to set the type for $myModel like private MyModel $myModel; PHP Code: <?php RE: InitController and phpstorm navigation - Kris40 - 02-27-2023 (02-25-2023, 05:48 AM)You're right, it's better, but when trying to find methods in Wrote: |