Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50310 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26624 invoked from network); 17 Nov 2010 23:11:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2010 23:11:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stefan-marr.de from 85.88.12.247 cause and error) X-PHP-List-Original-Sender: php@stefan-marr.de X-Host-Fingerprint: 85.88.12.247 toolslave.net Received: from [85.88.12.247] ([85.88.12.247:38149] helo=uhweb12247.united-hoster.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/6C-40885-20164EC4 for ; Wed, 17 Nov 2010 18:11:00 -0500 Received: from cust194-138.dsl.as47377.net ([62.166.194.138] helo=[192.168.0.12]) by uhweb12247.united-hoster.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1PIr9P-0000RQ-UP; Thu, 18 Nov 2010 00:10:55 +0100 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) In-Reply-To: Date: Thu, 18 Nov 2010 00:10:44 +0100 Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Simas Toleikis , PHP internals X-Mailer: Apple Mail (2.1081) Subject: Re: [PHP-DEV] Traits and static methods From: php@stefan-marr.de (Stefan Marr) Hi Simas: Thanks for sending me the test cases. I checked them in, and surprise surprise: it actually was already = completely implemented. I didn't had to touch any code... So the missing bit was being more explicit in the RFC. I added a section and an example based on your Singleton code. Now I also remember what the reference to the static modifier was about. You cannot use it to change it for a standard method. That means, if you have a normal method, you cannot make it static = however, you can for instance make a public method private, or add an = alias for it. That was what that statement was referring to. http://wiki.php.net/rfc/horizontalreuse Hope that helps Best regards Stefan On 17 Nov 2010, at 08:55, Stefan Marr wrote: > Hi Simas: >=20 > On 17 Nov 2010, at 07:32, Simas Toleikis wrote: >> Alright then, I am sure someone will find more uses for static = methods in >> Traits like factories/utilities (especially if traits can be made to = work >> with late static binding). >>=20 >> I assume this will be implemented in one way or another before or = after >> first 5.4 alphas! :) > Send me the tests/phpt-files for it, and I will have a lock at it over = the weekend. >=20 > Best regards > Stefan >=20 >=20 > --=20 > Stefan Marr > Software Languages Lab > Vrije Universiteit Brussel > Pleinlaan 2 / B-1050 Brussels / Belgium > http://soft.vub.ac.be/~smarr > Phone: +32 2 629 2974 > Fax: +32 2 629 3525 >=20 >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 --=20 Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525