Welcome Guest, Not a member yet? Register   Sign In
Loading CI instance inside helper, causes problem in library?
#8

[eluser]WanWizard[/eluser]
There isn't really something like '$this->CI'.

The call to the 'get_instance()' function returns a pointer to the CI 'root' object (how depends a bit on if you use PHP4 or PHP5).

When a controller is loaded, all loaded libraries and models are copied (by reference) to the controller, so you can still use things like '$this->load->', without ever defining this variable in your controller.

CI isn't really consistent in the way it handles this reference business, so it gets confusing when you should use $CI and when not.


Messages In This Thread
Loading CI instance inside helper, causes problem in library? - by El Forum - 04-14-2010, 11:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB