How to access own helper - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to access own helper (/showthread.php?tid=32655) |
How to access own helper - El Forum - 07-30-2010 [eluser]smilie[/eluser] Hi, I could not get things working using info from user manual and forum gave no clues either. So, my question is: I have created a helper in application/helpers/settings_helper.php In it I have 1 function: function get_settings($val) Helper is autoloaded from autoload.php Question is - how do I access this function from a library? :-) Thank you! Cheers, Smilie How to access own helper - El Forum - 07-30-2010 [eluser]mddd[/eluser] A helper is simply a php function. It is not part of any class. You should just be able to use get_settings() from any controller, view or library. How to access own helper - El Forum - 07-30-2010 [eluser]smilie[/eluser] Ah, I made it a class Now, class removed - works like a charm! Thanks mddd. Regards, Smilie |