php design patterns learning excercise