CodeIgniter Forums
Double loaded helpers? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: Double loaded helpers? (/showthread.php?tid=81218)



Double loaded helpers? - sprhld - 02-05-2022

Hello!

This time, I have only a technical question ;-)

In some cases, it would be nice to use a helper in the constructor of a controller. Like the cookie-helper in my latest case. To do so, I load it. But I also load it in BaseController to use it in other controller.

So my question is: Is the helper in that case double loaded or does CI ignore another try to load it?

The same with model. If I load a mode two times, it it two times in the memory or only once?


RE: Double loaded helpers? - iRedds - 02-05-2022

<toxic_mod>
That would be such an opportunity to see the code of the framework. 
But the framework is available as a binary. 

OR NOT?
</toxic_mod>

only once.


RE: Double loaded helpers? - sprhld - 02-14-2022

(02-05-2022, 08:03 AM)iRedds Wrote: <toxic_mod>
That would be such an opportunity to see the code of the framework. 
But the framework is available as a binary. 

OR NOT?
</toxic_mod>

only once.

fine. i'm not so deep in development, i coding for me and for fun. ;-)