Re: Re: OOP question
| From: | Ammar Ibrahim | Date: | Tue, 30 Aug 2005 22:58:55 +0000 |
| Subject: | Re: Re: OOP question | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39645@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
Ammar Ibrahim wrote:Now both Factory and Singleton are creational Design Patterns( They affect how objects are created ). Does it make sense to combine them together, say e.g. $object = Log::SingletonFactory( 'Database' ); the factory is clear in the previous example, but this also ensure that all subsequent calls will return reference to the first object created. Does that make sense?Does it make sense to have a factory of singlton objects? I think it does, does such thing exist in PEAR? Which packages?not sure what you mean .. are you asking if pear packages are using the singleton pattern? if that was the question: yes .. have a look at Log, LiveUser, MDB2 regards, Lukas No,