beggining desigin pattern by PHP