On Fri, 27 Jun 2003, Marcus B�rger wrote:
> Hello Wei,
>
> Friday, June 27, 2003, 3:36:11 AM, you wrote:
>
> WH> On Thu, 26 Jun 2003, Marcus B�rger wrote:
>
> >> 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.
>
> WH> Got it. Many thanks.
>
> No, you didn't.
You are right I didn't.
>
> WH> So if I understand correctly this time, it will make no difference from MI
> WH> when there is no overlap method and property in all parent classes.
>
> Sorry, but this is no OOP teaching class. Maybe you have a look at this:
Sorry for that. I didn't know anyhing about interfaces until I had to seek
for a solution for lacking of multiple inheritance.
I'll keep silent to accept what php5 can give me. Just one last question:
How, using php5 interfaces, can one avoid implementing method 'doit'
twice? Thanks.
class foo {...}
class bar {...}
class foobar {
function doit()
{
echo "doing it.";
}
}
class f extends foo, foobar {...}
class b extends bar, foobar {...}
> http://talks.php.net/show/php5intro?PHPSESSID=63d210273967af7c74e034d92c2bf5e5
>
It's very interesting. Thanks.
> but namespaces a removed from the language.
>
Best,
Wei He
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php