note 92637 added to language.oop5.abstract
| From: | Kiam at osu1 dot php dot net | Date: | Sat, 01 Aug 2009 19:04:49 +0000 |
| Subject: | note 92637 added to language.oop5.abstract | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158988@lists.php.net to get a copy of this message | ||
The person - student - employee is the classic example where the interfaces are more appropriate.
It is true that students, and employees are persons, but a person can be both a student, and an
employee.
<?php
class Person {
// Properties for Person objects.
}
interface IStudent {
// ...
}
interface IEmployee {
// ...
}
class Student implements IStudent extends Person {
// ...
}
class StudentEmployee implements IStudent, IEmployee extends Person {
// ...
}
----
Server IP: 69.147.83.197
Probable Submitter: 24.45.200.143
----
Manual Page -- http://www.php.net/manual/en/language.oop5.abstract.php
Edit -- https://master.php.net/note/edit/92637
Del: integrated -- https://master.php.net/note/delete/92637/integrated
Del: useless -- https://master.php.net/note/delete/92637/useless
Del: bad code -- https://master.php.net/note/delete/92637/bad+code
Del: spam -- https://master.php.net/note/delete/92637/spam
Del: non-english -- https://master.php.net/note/delete/92637/non-english
Del: in docs -- https://master.php.net/note/delete/92637/in+docs
Del: other reasons-- https://master.php.net/note/delete/92637
Reject -- https://master.php.net/note/reject/92637
Search -- https://master.php.net/manage/user-notes.php