note 47538 added to keyword.extends
| From: | Msquared at osu1 dot php dot net | Date: | Fri, 19 Nov 2004 14:48:18 +0000 |
| Subject: | note 47538 added to keyword.extends | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-80745@lists.php.net to get a copy of this message | ||
Multiple inheritence is often more trouble than it's worth. For example, you have a class foo
that inherits from both class bar and class baz. Classes bar and baz both have a fubar() method.
When you create a foo object and call its fubar() method, which fubar() method is called: bar's
or baz's?
It seems to me that using aggregate to glue one class's methods and data to another object is a
bit like Ruby's fixins, but I could be wrong...
----
Manual Page -- http://www.php.net/manual/en/keyword.extends.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47538
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47538&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47538&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47538&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47538&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47538&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47538&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47538&report=yes
Search -- http://master.php.net/manage/user-notes.php