Welcome Guest, Not a member yet? Register   Sign In
loading libraries and models from within a model
#2

[eluser]Stelian Mocanita[/eluser]
OOP wise models are just for database iterations so the best place to have them loaded would be the controller.

getinstance() would reiterate your $this superobject and use far more resources than needed which would make this not a very good practice. Use getinstance() where you have no way out but keep in mind it uses quite some resources.

Another work around would be sending the objects by reference to the model, but still not a good practice so I mostly use the #1 one.


Messages In This Thread
loading libraries and models from within a model - by El Forum - 03-24-2009, 03:39 AM
loading libraries and models from within a model - by El Forum - 03-24-2009, 03:55 AM
loading libraries and models from within a model - by El Forum - 03-24-2009, 04:00 AM
loading libraries and models from within a model - by El Forum - 03-24-2009, 04:13 AM
loading libraries and models from within a model - by El Forum - 03-24-2009, 04:14 AM
loading libraries and models from within a model - by El Forum - 03-24-2009, 04:17 AM
loading libraries and models from within a model - by El Forum - 04-14-2009, 09:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB