Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35641 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64608 invoked by uid 1010); 20 Feb 2008 08:28:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64593 invoked from network); 20 Feb 2008 08:28:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2008 08:28:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=stefan.marr.de@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stefan.marr.de@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.162.182 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: stefan.marr.de@gmail.com X-Host-Fingerprint: 209.85.162.182 el-out-1112.google.com Linux 2.4/2.6 Received: from [209.85.162.182] ([209.85.162.182:24142] helo=el-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/F0-57501-9B4EBB74 for ; Wed, 20 Feb 2008 03:28:41 -0500 Received: by el-out-1112.google.com with SMTP id n30so1271444elf.17 for ; Wed, 20 Feb 2008 00:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=1WBZVz+qCjI2SplZGA2ry7MkNPmar2rEBp6HIOi8ndk=; b=wx6nNK+Ev68kHF8ZUMVKv827vgtoDcKm7Br6TtW88PzdiXt5qnYhIYWJ+Zlq1iqazJK3We/EJlZiSWspUcg6472RvP7o52lVDeFN33Fp4TIU+vXNkc1lYluDEjxcZMH21YIS2pJjUOUr4it0Is1jF7OKuPaeEhGdsVSyBxwo9Vo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=xTKFhNsw047/eYTUhtF3JHBIsKOUbkPJIlNtoc9GSYkV+Qg3ShvD76CDak5Pw4KSKUff8eJzXVxSdpSKmnAvTMaF7lxcR06qm6FxUka/r9Xvb3+yDtoDJ8FRJkP1fDaP++Bs89ycypkQbjd4IOoVHDQr7bQZV9BAAlGKa6YfDJs= Received: by 10.143.157.10 with SMTP id j10mr6177873wfo.229.1203496117970; Wed, 20 Feb 2008 00:28:37 -0800 (PST) Received: by 10.142.141.2 with HTTP; Wed, 20 Feb 2008 00:28:37 -0800 (PST) Message-ID: <1e12984d0802200028k1c53071cj750b1b539295e2c3@mail.gmail.com> Date: Wed, 20 Feb 2008 09:28:37 +0100 Sender: stefan.marr.de@gmail.com To: "Lars Strojny" Cc: internals@lists.php.net, "=?ISO-8859-1?Q?Marcus_B=F6rger?=" , "=?ISO-8859-1?Q?Johannes_Schl=FCter?=" , "Sebastian Bergmann" , "Alexandre Bergel" , "Falko Menge" , "Sara Golemon" , derick@php.net In-Reply-To: <1203470933.3529.33.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <001c01c87264$3c01b4e0$b4051ea0$@de> <1203470933.3529.33.camel@localhost> X-Google-Sender-Auth: 083a93b405f51a3b Subject: Re: [PHP-DEV] RFC: Traits for PHP From: php@stefan-marr.de ("Stefan Marr") Hi Lars, > What about abstract methods in traits? I think this could be handy to > enforce the user class implement a data getter. > > trait Foo { > public function doSomething() > { > return str_replace("foo", "bar", $this->_getString()); > } > abstract protected _getString(); > } > > class Consumer > { > use Foo; > protected function _getString() > { > return "foo"; > } > } > > What do you think? I am sorry :) This part has been missing in the RFC. But is already implemented in the patch and supposed to work exactly like you has described it. Kind Regards Stefan