note 78293 added to language.oop5.interfaces
| From: | nrg1981{AT}hotmail{DOT}com at osu1 dot php dot net | Date: | Fri, 05 Oct 2007 13:48:47 +0000 |
| Subject: | note 78293 added to language.oop5.interfaces | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131138@lists.php.net to get a copy of this message | ||
In case you would want to, a child class can implement an interface:
<?php
interface water
{
public function makeItWet();
}
class weather
{
public function start()
{
return 'Here is some weather';
}
}
class rain extends weather implements water
{
public function makeItWet()
{
return 'It is wet';
}
}
$a = new rain();
echo $a->start();
echo $a->makeItWet();
?>
----
Server IP: 212.24.129.51
Probable Submitter: 85.160.4.114
----
Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php
Edit -- https://master.php.net/note/edit/78293
Del: integrated -- https://master.php.net/note/delete/78293/integrated
Del: useless -- https://master.php.net/note/delete/78293/useless
Del: bad code -- https://master.php.net/note/delete/78293/bad+code
Del: spam -- https://master.php.net/note/delete/78293/spam
Del: non-english -- https://master.php.net/note/delete/78293/non-english
Del: in docs -- https://master.php.net/note/delete/78293/in+docs
Del: other reasons-- https://master.php.net/note/delete/78293
Reject -- https://master.php.net/note/reject/78293
Search -- https://master.php.net/manage/user-notes.php