I need to pass a variable number of strings to instantiate different classes. I can always do a switch on the size of the array:
switch(count($a)) { case 1:
Look here. Does method 2 help ? Also, perhaps by moving the switch to the constructor (if that is practical) you would be able to hide this from the rest of the code.