Interfaces are defined to provide a common function names to the
implementors. Different implementors can implement those interfaces
according to theri requirements. You can say, interfaces are skeltons
which are implemented by developers.
As of PHP5, it is possible to define an interface, like this:
Then, if another class implemented that interface, like this:
As of PHP5, it is possible to define an interface, like this:
interface Mail { public function sendMail(); } |
class Report implements Mail { // sendMail() Definition goes here }
No comments:
Post a Comment