Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 8 months ago. Improve this question Take a look on that pseudocode As service locator is considered as anti pattern, how to avoid it in this case?
Tag: strategy-pattern
I’m having a little trouble implementing the Strategy pattern
I confess that I’m having a bit of difficulty implementing the strategy pattern in a program that aims to display a different message daily (Ex. Message of the day…), but on special dates there may be some variations (Ex. Merry Christmas : Message from day…), could someone give me an example of how I “could” make this implementation in php?