Abstract factory on PHP