Welcome Guest, Not a member yet? Register   Sign In
Is loading libraries within models a good idea?
#5

[eluser]bretticus[/eluser]
The Model class calls one method: _assign_libraries().

The comments for this method are (bold added for emphasis):

Quote:* Creates local references to all currently instantiated objects
* so that any syntax that can be legally used in a controller
* can be used within models.

Just do it in the Model. No worries. You won't have any database overhead by choosing a Model either. $this->db is accessible in either a Controller or a Model.

Cheers!


Messages In This Thread
Is loading libraries within models a good idea? - by El Forum - 03-19-2010, 05:35 AM
Is loading libraries within models a good idea? - by El Forum - 03-19-2010, 10:35 AM
Is loading libraries within models a good idea? - by El Forum - 03-19-2010, 11:56 AM
Is loading libraries within models a good idea? - by El Forum - 03-19-2010, 09:25 PM
Is loading libraries within models a good idea? - by El Forum - 03-20-2010, 12:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB