• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to access own helper

#1
[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

#2
[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.

#3
[eluser]smilie[/eluser]
Ah, I made it a class Sad

Now, class removed - works like a charm!

Thanks mddd.

Regards,
Smilie


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.