since from your code it seems that one can choose a type outside the $classmap array (eg custom class implementing TransportInterface), wouldn't it make more sense to remove this array and use namespaces instead ?