Damien wrote:
Hi all, Say you may want to create an instance in multiple ways, such as creating from scratch or loading from a database. Is something like this normal for creating an instance?
I do this: class Foo { function Foo($id=0) { if (is_int($id) && (int)$id > 0) { return $this->Load($id); } // set default variables. } } -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php