Wez Furlong wrote:
>class C {
> delegatee $foo = new IFoo(); // "implements" IFoo by delegation
> delegatee $bar = new IBar(); // "implements" IBar by delegation
>}
>
I didnt see anyone suggest this as an alternative to the delegatee
syntax, - it just a bit clearer to read (to me anyway..)
class C extends something {
extends IFoo as $foo;
extends IBar as $bar;
var ....
function ....
}
....
just a thought..
regards
alan
>
>$c = new C();
>
>if (has_a($c, "IFoo"))
> $c->foo();
>if (has_a($c, "IBar"))
> $c->bar();
>
>This "has_a" function/operator is one of the small things missing
>from the current delegation RFC, along with an "as" operator.
>For full details on this stuff, take a look at those archives - theres
>no need to keep going round in circles :-)
>
>--Wez.
>
>
>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php