DesignPatterns with PHP example