kickassamd Posted June 16, 2008 Share Posted June 16, 2008 Just wondering how others handle creating isntances of mutliple objects... I usually have 1 file that includes all my classes then from there i create all my instances there. How does everyone else do it? Link to comment https://forums.phpfreaks.com/topic/110484-instance-creations/ Share on other sites More sharing options...
trq Posted June 16, 2008 Share Posted June 16, 2008 You create instantiate an object when you need it. Link to comment https://forums.phpfreaks.com/topic/110484-instance-creations/#findComment-566850 Share on other sites More sharing options...
kickassamd Posted June 17, 2008 Author Share Posted June 17, 2008 Well obviously, I am meaning for like core objects, like database, smarty, session etc etc. Do you guys create them all @ once or across files. Link to comment https://forums.phpfreaks.com/topic/110484-instance-creations/#findComment-566911 Share on other sites More sharing options...
maexus Posted June 17, 2008 Share Posted June 17, 2008 My core objects come into life when needed. Not every page needs a db for my projects. My objects are created on the page that needs them, no blanket creations. Link to comment https://forums.phpfreaks.com/topic/110484-instance-creations/#findComment-566913 Share on other sites More sharing options...
trq Posted June 17, 2008 Share Posted June 17, 2008 As I said.... You create instantiate an object when you need it. By the way, that ought read create / instantiate Link to comment https://forums.phpfreaks.com/topic/110484-instance-creations/#findComment-566942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.