Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35737 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18051 invoked by uid 1010); 22 Feb 2008 17:23:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18029 invoked from network); 22 Feb 2008 17:23:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2008 17:23:01 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:4475] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/D1-22931-4F40FB74 for ; Fri, 22 Feb 2008 12:23:01 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 22 Feb 2008 19:23:05 +0200 Received: from [192.168.16.90] ([192.168.16.90]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 22 Feb 2008 09:23:02 -0800 Message-ID: <47BF04EC.8090202@zend.com> Date: Fri, 22 Feb 2008 09:22:52 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: David Coallier CC: Lukas Kahwe Smith , Gregory Beaver , Marcus Boerger , php@stefan-marr.de, Evert|Rooftop , internals@lists.php.net References: <001c01c87264$3c01b4e0$b4051ea0$@de> <1e12984d0802191346x7c145d7fp14c01ec4e5993779@mail.gmail.com> <47BB4F49.1030904@rooftopsolutions.nl> <1e12984d0802191359p4f21c3acrdff4b86adfb4bf3@mail.gmail.com> <1495054633.20080220205951@marcus-boerger.de> <1e12984d0802201243gfa51f01i311891e8965ed51e@mail.gmail.com> <9EE7F229-0710-48E8-9A26-DC8031AF8979@pooteeweet.org> <1985981545.20080222134413@marcus-boerger.de> <47BEE001.9080602@chiaraquartet.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Feb 2008 17:23:02.0305 (UTC) FILETIME=[93E7A910:01C87577] Subject: Re: [PHP-DEV] RFC: Traits for PHP From: stas@zend.com (Stanislav Malyshev) Hi! > Fun that you mentionned that structure greg because I was thinking of > something along those lines. Something very similar actually but the > aliasing could look like this: > > trait One { > function name() { return __TRAIT__; } > function removeMe() {} > } > > trait Two { > function name() { return __TRAIT__; } > } > > class Reel traits One, Two > { > override One::name with Two::name; > remove Two::removeMe; > } > > > $object = new Reel(); > echo $object->name(); // Echos "Two" of course. Two doesn't have removeMe. If you meant One::removeMe then why One is needed at all? You didn't use any method of it. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com