Would it be possible to import namespaces using a variable like this:
$namespace = 'User\Authorization\Certificate';
use $namespace;
Obviously this won't run as use statement expects a constant but is there a workaround?
Edit: Discovered a gem (only in PHP > 5.3): class_alias($namespace, alias); which does pretty much the same thing with use User\Authorization\Certificate as alias; so will be using that.