PHP 5: Interfaces
Interfaces are a way of adding the definition of extra methods onto a class to force it to conform to a particular pattern. An interface consists entirely of methods with empty bodies i.e. abstract methods: interface Saveable() { public function save(); } Classes implement interfaces as a way of guaranteeing that they will allow a …