A single(ton) child amongst us...
View Single Post
04-26-2008, 12:41 AM
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
This is a pretty one sided discussion so far. Thanks for letting me use your message boards as a big ole online notebook. :)
I think I've figured out what I'm going to do. Right now, getInstance takes one argument, the object to be loaded. If I change it to
Now it'll load the object into memory, but if $szInclude is set, it will load said file into memory before loading the object. So if I load UAC which is a child class of MySQLDB, I'll use
$this->db =& ke::getInstance("uac", "MySQLDB");
and the method will first require_once the MySQLDB file (the parent class), then load UAC (the little'un) into $this->db so that I can call $this->db->childMethod(); or $this->db->parentMethod(); without obfuscating my -> chain any further than needs to be.
PHP is f'n cool.
This may still not be the best way to go about this, but if I come up with anything else, or if anybody has any thoughts...
View Public Profile
Send a private message to delayedinsanity
Visit delayedinsanity's homepage!
Find More Posts by delayedinsanity