Welcome Guest, Not a member yet? Register   Sign In
Getting object reference from load->library
#1

[eluser]WillKemp[/eluser]
Hi,

$this->load->libary() doesn't appear to return a reference to the object it instantiates, in the way that 'new' does. I know i can set the object name and refer to it that way, but that doesn't seem to be any use when the object name is dyamic (i.e., i need to instantiate an unknown number of objects in a loop). I need to pass the object references to a view.

I'm having to load the class using 'include()' and then create the objects using 'new' - which works fine. But it breaks consistency and i'd rather do it in a codeigniter sort of way if possible.

Is there any way to get a reference to a 'load'ed object in this sort of context?


Messages In This Thread
Getting object reference from load->library - by El Forum - 04-02-2009, 12:00 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 12:21 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 01:03 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 01:06 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 01:14 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 01:22 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 02:28 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 02:43 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 02:45 PM
Getting object reference from load->library - by El Forum - 04-02-2009, 02:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB