Is there a way to indicate optional method in the interface (so that the contract only indicated the number / type of arguments to be given)?
Please give maybe a little more understanding and insight into the problem, and indicate a solution? See for instance this discussion: Optional Methods in Java Interface
In the app I'm using Listeners connected to the Persistence (Doctrine). So I'm using some of these methods:
prePersist()
preUpdate()
postPersist()
postUpdate()
etc.
Now, while refactoring, since there are too many Entities (objects to be persisted) I decided to split the parts of these methods into separate classes.
However not all of them need all pre-... and post-... methods. I need to make sure they are given appropriate number and type of arguments. How do you do that in PHP?