Welcome Guest, Not a member yet? Register   Sign In
Calling a library inside a helper?
#1

[eluser]Maximilian Schoening[/eluser]
Hi,
can I call a library from inside a helper?

Like this:

Code:
$this->load->library('name');

Thanks,
Max
#2

[eluser]jedd[/eluser]
Hi Maximilian and welcome to the CI forums.

[quote author="Maximilian Schoening" date="1251687013"]
can I call a library from inside a helper?

Like this:

Code:
$this->load->library('name');
[/quote]

You can, but under what circumstances are you expecting to do this?

The CodeIgniter core does this (typography helper calls typography library) but I'm not sure of the motivation / background there.
#3

[eluser]Maximilian Schoening[/eluser]
Hi,
thanks for the reply. I already found a better solution. Since helpers are only supposed to contain a single function I went another way.

Thanks,
Max




Theme © iAndrew 2016 - Forum software by © MyBB