i wanted to ask how do I properly implement a hooks and actions with a design pattern (similar to the ones used in WordPress). I guess it is done with Observer pattern, but cannot really figure out how to do this.
If I have a class that does 3 main functions, I want to create "events" that fire on the end/beginning of this function. From all the design patterns I've seen, the Observer seems to be the most similar to what I want to achieve
Aucun commentaire:
Enregistrer un commentaire