oop patterns for php 5.3