Welcome Guest, Not a member yet? Register   Sign In
Accessing the $config array from my custom helper
#1

[eluser]Fabdrol[/eluser]
Hi guys!

I've written some extra helper functions inside my system/helpers folder. It contains some lifeline functions for my application.

Now, Since the app will run on different hosts later on, I want to keep control of every asset folder, and I defined them in my custom $config array.

Using
Code:
$this->config->item('icon_path');

the system generates the following error:
Code:
Fatal error: Using $this when not in object context in /Users/Fabian/Sites/Dyn4/app/system/helpers/dynamics_helper.php on line 21

My conclusion is, the $this pointer doesn't point to the CI object from the helper. (which isn't that strange)

Q: Is there a way that I can access the $config array from the helper?

thanks in advance!


Messages In This Thread
Accessing the $config array from my custom helper - by El Forum - 09-24-2009, 03:01 AM
Accessing the $config array from my custom helper - by El Forum - 09-24-2009, 03:04 AM
Accessing the $config array from my custom helper - by El Forum - 09-24-2009, 03:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB