Re: Traits and static methods
| From: | Tom Sartain | Date: | Tue, 16 Nov 2010 21:22:09 +0000 |
| Subject: | Re: Traits and static methods | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50269@lists.php.net to get a copy of this message | ||
On Tue, Nov 16, 2010 at 3:55 PM, Ferenc Kovacs <info@tyrael.hu> wrote:
>
> for reusable singleton pattern with php 5.3
> http://www.slideshare.net/fabpot/design-patternrevisitedphp53
> slide 11 and 12
>
> Tyrael
>
The problem with the solution presented in the slides is that it
limits every singleton class to only ever be able to inherit from
Singleton, so we can't have a child class that is a singleton while
the parent is not. Something that having Traits would solve. Though
we'd still have singletons, which is a different problem.
-Tom