PHP/Interfejsy: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Yrazec (dyskusja | edycje)
→‎Przykładowe użycie: poprawka przy liście ograniczeń interfejsów pkt 2 (patrz: http://www.php.net/manual/en/language.oop5.interfaces.php)
Linia 134:
class Bar extends Foo implements GooInterface
{
public function joetraurig()
{
echo 'joetraurig';
} // end joetraurig();
} // end GooInterface;
</source>
Linia 163:
interface Joe extends Foo, Bar
{
public function joetraurig();
} // end Joe;
 
class Abc implements Joetraurig
{
public function foo()
Linia 178:
} // end foo();
public function joetraurig()
{
echo 'joetraurig';
} // end foo();
} // end Abc;
Linia 193:
echo 'Ten obiekt implementuje interfejs Bar<br/>';
}
if($class instanceof Joetraurig)
{
echo 'Ten obiekt implementuje interfejs Joe<br/>';