Design Pattern in PHP