Welcome Guest, Not a member yet? Register   Sign In
is it a good practice to load the model in the constructor function??
#2

[eluser]GrahamDj28[/eluser]
Resources that I need throughout a controller, model, or whatever type of class, I load in the constructor. I do first define these variables above the constructor as
Code:
public, protected or private $variable_name;

Loading to much in the constructor can slow things down a bit


Messages In This Thread
is it a good practice to load the model in the constructor function?? - by El Forum - 10-06-2012, 04:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB