Yet another example of usage design patterns in php