PHP class generator utility