Thing is, one of my mods is ideally placed to benefit from code I've done in the past, which I always namespace using reverse URI notation like so:
However, if I want to add this to an extension do I have no choice but to add the \vendor_name\mod part to the beginning? If this is the case it is not going to be pretty as I was hoping to just copy in these classes without having to change them, as there are rather a lot. I suppose I can use some kind of build script to get around this if I have to (i.e- edit namespaces automatically) but it's not something I really want to do, and I fully expect it to go horribly wrong.
Is there any way in PHP to group classes under a namespace even if that's not what they have in the files themselves? e.g- so I can force the classes to be loaded as:
Does anyone else use outside code a lot? How are you handling it?