
Yoni Lamri - 2015-07-22 16:14:59
This is a really clear tutorial, thanks for sharing this. I basically use this in my controller classes.
You can also mention that you can check implementation with the instanceof operator. For example:
class BaseController implements Controller {...}
$control = new BaseController();
$control instanceof Controller === true;
This could be usefull
In my case i did both, implement an interface in an abstract class.
This class don't have the interface defined function signatures and children must define them.
A simple exemple: a name function which is specific to each children.