note 57776 added to language.oop5.interfaces
| From: | nuying117 at 163 dot com | Date: | Thu, 13 Oct 2005 20:48:46 +0000 |
| Subject: | note 57776 added to language.oop5.interfaces | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-96982@lists.php.net to get a copy of this message | ||
If a class implements two interfaces , but these two interfaces have a same method,for example
<?php
interface TestInterface1
{
function testMethod1();
function testMethod2();
}
interface TestInterface2
{
function testMethod2();
function testMethod3();
function testMethod4();
}
class ImplementClass implements TestInterface1,TestInterface2
{
function __construct()
{
echo "I am constructor\r\n";
}
function __destruct()
{
echo "I am destructor\r\n";
}
function testMethod1()
{}
function testMethod2()
{}
function testMethod3()
{}
function testMethod4()
{}
}
?>
It will cause a fatal error!
----
Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57776
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57776&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57776&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57776&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57776&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57776&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57776&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57776&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57776&report=yes
Search -- http://master.php.net/manage/user-notes.php