I am working on my own MVC infrastructure and found myself stuck. I need the following construct:
Controller
Both "Backend_Crud_Controller" and "Frontend_Crud_Controller" have the same functionality, and therefore they must extend another class called "Base_Crud_Controller", the only difference comes from the "Backend / Frontend" controllers, which implement different mechanisms.
Mostly they should inherit both classes, but my problem is that the controller "Backend / Frontend" does not necessarily extend the "Base_Crud_Controller".
I know that multiple inheritance does not exist in PHP, but I am looking for a solution, I decided to refrain from Mixins (as in Symfony), since I do not consider this an elegant solution.
Interfaces do not suit me, since they all end with specific classes that must implement the methods.
source
share