Welcome Guest, Not a member yet? Register   Sign In
Loading objects in model, how do I do this?
#4

[eluser]darrentaytay[/eluser]
If you want to include external classes, you can just do something like this inside your model:

Code:
require_once(APPPATH . "classes/tire.class.php");

You can then create multiple instances of the object;

Code:
$tires = array(
   new Tire(), new Tire(), new Tire(), new Tire()
);

And there's an array of Tire objects! :-)


Messages In This Thread
Loading objects in model, how do I do this? - by El Forum - 05-14-2011, 10:53 PM
Loading objects in model, how do I do this? - by El Forum - 05-15-2011, 12:07 AM
Loading objects in model, how do I do this? - by El Forum - 05-15-2011, 02:34 AM
Loading objects in model, how do I do this? - by El Forum - 05-15-2011, 03:54 AM
Loading objects in model, how do I do this? - by El Forum - 05-15-2011, 06:59 AM
Loading objects in model, how do I do this? - by El Forum - 05-15-2011, 07:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB