Popular design patterns PHP implementation