Hey guys got an architecture problem, I will explain the structure first
Service:
- TestService
Classes:
- InterfaceClass
- ParentClass
- FirstChildClass
- SecondChildClass
- ThirdChildClass
The Parent implements the interfaceClass and the childs extends the parentClass.
all childs have different functions, lets say firstfunction on FirstChildClass, secondfunction on SecondChildClass,
i want to call firstfunction on serice by calling only the parent, so for example ParentClass:init()->firstclass();
the language im gonna be using is PHP, anyone have any idea how can I implement such thing?