A couple of months ago it was agreed on how to get multiple inheritance 
like behavior in a way which could work with PHP. I just haven't had time 
to implement it yet.
The talk was about aggregation of instances of classes with auto-proxy.
So you'd do something like:
class foo extends bar contains barbara, foobar {

}

$obj = new foo();
$obj->method(); /* would check foo and if method doesn't exist will 
auto-proxy to objects barbara and foobar in that order whatever matches 
first.*/
You could access the specific object by $obj->classname or $obj->barbara.

Try and find it in the archives.
Andi

At 06:59 PM 6/6/2002 +0100, Dan Hardiker wrote:
> > I believe the OO level we have in ZE2 is the upper limit
> > of  what a scripting language should have.  There's no doubt in my mind
> > that  going beyond that is going to complicate the language beyond what
> > our  average users want.
>
>I would have to disagree to this statement extremly. It would not
>complicate the language as those not interested would just ignore the new
>options and go along as normal. (i.e. all methods and variables being
>public by default)
>
>I sit in many PHP channels (IRC), and observe many class-based PHP
>networks (php-classes.org is one I monitor closely) and can say definatly
>that the majority of PHP users want *more* OO capabilities in PHP.
>Interfaces provide a simple framework for expansive web scripts, which
>currently can only be botched with extends... and multiple inheritance
>would help my current PHP (web-based) project. If these features are too
>complex for you to understand - ignore them!
>
>In my opinion the demand is certainly there, if a subset of people dont
>want to use it - we're not asking them to. What the masses are calling for
>(and they obviously are with the frequency of this kind of post appearing)
>is the option to decide. Although Im no expert on the PHP source code and
>the underlying ZE - is it really that complex to please everyone and give
>a choice? [for those concerned about the proposed stuff having performance
>impacts - then make it a configure option... --with-more-oop (or
>whatever)]
>
>--
>Dan Hardiker [[EMAIL PROTECTED]]
>ADAM Software & Systems Engineer
>First Creative Ltd
>
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to