So.. I have a problem with an object creation Pattern.
I have multiple canonicalIds eg.
school/1
school/1/class/12/
school/1/class/12/teacher/35
I have different objects that represent these and are created from the id. what I want to do in a clean way is cycle through the regexs' and determine which object it is.
I'm stuck determining how i should go about matching the regex to a specific factory method.
Aucun commentaire:
Enregistrer un commentaire