Re: Class inheritance behaviour

From: Date: Sun, 21 Sep 2003 18:10:23 +0000
Subject: Re: Class inheritance behaviour
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-163367@lists.php.net to get a copy of this message
Robert Cummings wrote:
Are you looking to create a single point of access to any libraries your application may wish to use Yes. Instead of juggling 5-6 objects, just move around one object.
and to subsequently base this on a singleton pattern (only one instance of the object may exist?)? Yes. Currently in my code, there is the ADODB object, which is used as normal.
I pass this object by reference to Smarty so its plugins can access the DB if neccessary, and two other classes that need DB access. Im going on the assumption, that if one doesn't have to pass by reference, then dont do it, especially large objects, and having multiple copies of them. All of this is just a thought. Whether its feasable, is another story for my app....

« previous php.general (#163367) next »