Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50287 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47052 invoked from network); 17 Nov 2010 06:40:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2010 06:40:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=simast@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=simast@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.177 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: simast@gmail.com X-Host-Fingerprint: 209.85.216.177 mail-qy0-f177.google.com Received: from [209.85.216.177] ([209.85.216.177:36113] helo=mail-qy0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/C0-40885-DE873EC4 for ; Wed, 17 Nov 2010 01:40:45 -0500 Received: by qyk2 with SMTP id 2so578566qyk.8 for ; Tue, 16 Nov 2010 22:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=gGCzRQjLbyWOOzUZvi9Iba4hpKpSX09/slRh2g7ZzLk=; b=LqtP0xZwI3X2TU0gvS65oyiYg2KY7HDs3VYpysG5NU6WeMNo1yGuUMt/PAk5raI98g fsEjaHaX5ODC1bbSqB+NCITSMt1ihji19n/qAV+m/5OF1OOIzr9ZyCeNJaXm0svQ+kTO 1GSEdTQOv2VMC+Togcj1HMgm1eZKvUlOzfi2M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=eOMdIFGk1GcqPmd5JIySuwM4UQfLGS3wqUfUqaaGV8RN9h3/i5CR3WZ0d5J1QcphQ9 VHeUfJESNpUgayigh+0ksX6Gjg3vbDjQ+/yISpd36lD2oJOFDDoVdl/xZg5hlmr7h9WI tO1xnus6CKLQq5C4UvkqGremN16z5e5+iGX8I= MIME-Version: 1.0 Received: by 10.229.232.205 with SMTP id jv13mr7108256qcb.68.1289976042906; Tue, 16 Nov 2010 22:40:42 -0800 (PST) Received: by 10.229.250.77 with HTTP; Tue, 16 Nov 2010 22:40:42 -0800 (PST) In-Reply-To: References: Date: Wed, 17 Nov 2010 08:40:42 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016363b8d84ce6702049539f313 Subject: Re: [PHP-DEV] Traits and static methods From: simast@gmail.com (Simas Toleikis) --0016363b8d84ce6702049539f313 Content-Type: text/plain; charset=UTF-8 Hi Ferenc, for reusable singleton pattern with php 5.3 > http://www.slideshare.net/fabpot/design-patternrevisitedphp53 > slide 11 and 12 > As Tom already pointed out - there is that lock-down of your parent(s) to singletons with this type of implementation and there are other shortcomings when used with SPL, for example: class Test extends ArrayObject { } Without creating some sort of intermediate ArrayObjectSingleton class you can't make Test a singleton (and traits would solve that). /Simas --0016363b8d84ce6702049539f313--