Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB