HeadFirstDesignPatterns in php