note 112536 added to language.oop5.interfaces
| From: | VladimirKornea | Date: | Wed, 26 Jun 2013 19:34:49 +0000 |
| Subject: | note 112536 added to language.oop5.interfaces | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195370@lists.php.net to get a copy of this message | ||
By asking your colleague to implement your interface, you are asking him to guarantee that he has
implemented all the methods you need. He can implement multiple interfaces, each being a contract,
so that the guy cleaning up the cruft down the road can see which methods belong to which area of
concern; but since interfaces are primarily contracts rather than documentation, a class cannot
implement two interfaces containing the same method since that would make the contract lose
credibility through ambiguity. Thus a class can implement two interfaces with overlapping concerns
only by factoring their common methods into a third interface that serves as a base for the first
two, which resolves the contractual ambiguity.
----
Server IP: 69.147.83.199
Probable Submitter: 74.73.47.242
----
Manual Page -- http://php.net/manual/en/language.oop5.interfaces.php
Edit -- https://master.php.net/note/edit/112536
Del: integrated -- https://master.php.net/note/delete/112536/integrated
Del: useless -- https://master.php.net/note/delete/112536/useless
Del: bad code -- https://master.php.net/note/delete/112536/bad+code
Del: spam -- https://master.php.net/note/delete/112536/spam
Del: non-english -- https://master.php.net/note/delete/112536/non-english
Del: in docs -- https://master.php.net/note/delete/112536/in+docs
Del: other reasons-- https://master.php.net/note/delete/112536
Reject -- https://master.php.net/note/reject/112536
Search -- https://master.php.net/manage/user-notes.php