Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35628 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62064 invoked by uid 1010); 19 Feb 2008 23:46:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 62049 invoked from network); 19 Feb 2008 23:46:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2008 23:46:12 -0000 Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain strojny.net designates 85.10.204.248 as permitted sender) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 85.10.204.248 milch.schokokeks.org Received: from [85.10.204.248] ([85.10.204.248:35764] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/20-55225-34A6BB74 for ; Tue, 19 Feb 2008 18:46:12 -0500 Received: from [192.168.0.8] (xdsl-87-78-210-149.netcologne.de [::ffff:87.78.210.149]) (AUTH: PLAIN lars@schokokeks.org, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Wed, 20 Feb 2008 00:46:08 +0100 id 0000000000020007.0000000047BB6A40.000005B1 To: Jochem Maas Cc: php@stefan-marr.de, internals@lists.php.net, "'Marcus =?ISO-8859-1?Q?B=F6rger=27?=" , "'Johannes =?ISO-8859-1?Q?Schl=FCter=27?=" , 'Sebastian Bergmann' , 'Alexandre Bergel' , 'Falko Menge' , 'Sara Golemon' , derick@php.net In-Reply-To: <47BB6111.3080308@iamjochem.com> References: <001c01c87264$3c01b4e0$b4051ea0$@de> <1203461114.24580.45.camel@localhost> <47BB6111.3080308@iamjochem.com> Date: Wed, 20 Feb 2008 00:46:07 +0100 Message-ID: <1203464767.27871.4.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-1457-1203464769-0001-2" X-Mailer: Evolution 2.21.91 Subject: Re: [PHP-DEV] RFC: Traits for PHP From: lars@strojny.net (Lars Strojny) --=_milch.schokokeks.org-1457-1203464769-0001-2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Jochem, Am Mittwoch, den 20.02.2008, 00:06 +0100 schrieb Jochem Maas: [...] > if a trait would could contain all the methods required to implement > an interface and a class uses it (the trait) and implements the > relevant interface would it (the interface) be satified? Yes. The following should work: interface IFoo { public function method(); } trait TFoo { public functin method() { echo "Hello World!"; } } class CFoo implements IFoo { use TFoo; } This would be fine. > also might it be an idea to allow a trait to specify that it > implements an interface for the purposes of development (errors > triggered due to incorrect/incomplete implementation) > BUT not have the interface be carried to any classes that use the > trait? I don't see any sence in it. Why should one generalize an interface of a trait? cu, Lars --=_milch.schokokeks.org-1457-1203464769-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iQIcBAABAgAGBQJHu2o+AAoJECQPF+sCY6wHf3IP/37h2djHMOfnz0710egobFEd ciJzExbwtRhBh9p3KO2Kl4v0IeHuUecMW5b+n/WReAa0RSU2mB8p1J/yDmv+QN9m 6BSviZeER8NJldLtZw9URelRubh++OJ3OLX8LvdJd/vyKvKIBNDBSxNmKxKxTTT+ ovaQpaliUiOrLnJTZo8yc6saw62L01InghQQHw6TMcPuydGLvXKOQkOz3Z3Qk75i 3ER0UHtztqZpqwXnxPI2nQVC7f999Z+7K91BoH94lw081j8gcx6RPV0W2YJ/gX8I 3gu8UrS6UZcnJyaL2Wll4RmcVGd51JdcAiKrMcF6Kb6St0SN6ODt8619B7X9lL85 vjucKR0v30R0x6VnFwlwiuNVNvkCDsyGq6eSEUZHZhpaX7gpBSDu+iTJga6kXjus PzEr+g/E3q2cQLWuyKtYujYQPlh+QoEdIShMdXymoTmM+EExa/2pL0PlQ/oXUEx0 rULdO0bhIo9nBX/E7QKWbK6OaVUmyYrgwqd2bMB3uYZkNU+XV20Ye52l/VfUv2vm dNnEVXGnva0a9FEBMGTFdIxqucycRMo67JmRFNOIndgc/dKaMB3Ewj52wGISzQN6 jkswYUzg26HV5W4zHVBawFHFKOXa0m2WVvn7EQHbtxyhC83l+En+jVS/kCUBWG7r M38IvWgO5pyFUpMwpCPH =qqr0 -----END PGP SIGNATURE----- --=_milch.schokokeks.org-1457-1203464769-0001-2--