Welcome Guest, Not a member yet? Register   Sign In
Need apply Class in the Helper is posible?
#1

Hello it is possible to apply classes within helpers without using libraries, I would like to know if there is the possibility to apply this to require functions from classes globally of the module App or other namespace as required.
PHP Code:
class Helpers_CurrencyConverter { ... } 

Since I've been waiting for your prompt reply, greetings and don't miss the match boca - river
Reply
#2

You can invoke all classes within a helper using include or new with a fully qualified namespace name.

Take a look at the system/helpers/url_helper.php it uses a library.

You should be able to load a library just like you would any place else.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(This post was last modified: 03-15-2021, 06:16 AM by yuma2020.)

(03-14-2021, 08:52 PM)InsiteFX Wrote: You can invoke all classes within a helper using include or new with a fully qualified namespace name.

Take a look at the system/helpers/url_helper.php it uses a library.

You should be able to load a library just like you would any place else.
Ok, that means that I must call from a library the functions, constants and data variables from this source and carry it by applying it from a simple function.
By the way, the football game came out river 1 - boca 1 :|
Reply




Theme © iAndrew 2016 - Forum software by © MyBB