Hello Wei,

Thursday, June 26, 2003, 11:16:16 AM, you wrote:

WH> On Thu, 26 Jun 2003, Sebastian Bergmann wrote:

>> Wei He wrote:
>> > How could I live without aggregation or multiple inheritance?
>> 
>>   Java developers are very happy without these concepts. Why? Because
>>   they have interfaces. Guess what? We have them, too.

WH> If I understand correctly, using of interfaces will force a subclass to 
WH> implement an interfaced method even if this method behaves the same
WH> as one of its parent classes.

wrong

A class that implements interfaces inherits all methods defined in the
interfaces as abstract methods. In other words the class is abstract if
not all interface methods are implemented. From there normal inheritance
rules apply.

WH> If so I'll have to copy method codes from parent classes like what I 
WH> have do so in PHP4 without aggregation. Right?

No, the method implementations are inherited.

-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]


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

Reply via email to