Welcome Guest, Not a member yet? Register   Sign In
Problem class objects and CI object
#3

[eluser]bramb79[/eluser]
[quote author="wiredesignz" date="1218593779"]$CI =& get_instance() only returns a reference to CI, it does not make a copy of the super object (controller).[/quote]

Thanks for the info. Deep down I knew that already (had read it before). Smile

But that still leaves me with my question. What I would ideally want (or at least I think I do) is to make $CI (after stating $CI =& get_instance()) available in my entire class. Stating it in the constructor does not help. I think it is out of scope for other methods in the class. Putting $this->CI & get_instance() in the constructor does bring it within scope for the other methods but when I then create a new instance of the class I end up with the CI object as part of the data of that object.


Messages In This Thread
Problem class objects and CI object - by El Forum - 08-12-2008, 10:21 AM
Problem class objects and CI object - by El Forum - 08-12-2008, 03:16 PM
Problem class objects and CI object - by El Forum - 08-13-2008, 03:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB