RE: [PEAR-DEV] do pear packages create their own seperate DB connections?

From: Date: Wed, 23 Apr 2003 09:39:01 +0000
Subject: RE: [PEAR-DEV] do pear packages create their own seperate DB connections?
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15373@lists.php.net to get a copy of this message
> I don't really understand how standard PEAR packages should be able to > figure out if you have an instance of a certain package from global > space without a total mess? I am probably misunderstanding what you are > proposing here. > Hi Lukas, Sorry if I'm "over-discussing" this topic, but isn't this (http://www.horde.org/papers/kongress2002-design_patterns/) exactly what you're looking for for MDB? the example on the bottom of the page shows you can have more instances of one class depending on the passed parameters. If a package requests an instance of MDB it will check if such an instance with the same paramaters (like the DSN) exists and if it does it will return a reference to that one. If not, it will create a new instance. HTH Jeroen

« previous php.pear.dev (#15373) next »