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
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil