It is actually less generic.

The nice thing is, you can download a number of packages that all comply with PSR-4 and stuff them into a directory together with some custom code, and the result will again comply with PSR-4. All you need is to rewrite the namespace-directory relationship.

This is exactly what Composer does (or will do), when it translates the directories that are relative to each package into directory paths relative to the project root.