A native implementation of PSR-0 using only the autoloader from the PSR-0 example in the spec would expect a folder structure like this:
League\Oauth2\Client\Foo = myapp/somefolder/League/Oauth2/Client/Foo.php
League\Oauth2\Server\Bar = myapp/somefolder/League/Oauth2/Server/Bar.php
If I was making these as packages, I could make them into two packages, which would be installed in different locations, because thats how Composer rolls:
League\Oauth2\Client\Foo = myapp/vendor/league/oauth2/src/League/Oauth2/Client/Foo.php
League\Oauth2\Server\Bar = myapp/vendor/league/oauth2-server/src/League/Oauth2/Server/Bar.php
No it doesn't. It maps different locations with different namespace prefixes.
SplClassLoader will work in the same way, but you have to do it yourself.
Sure it is, you can use the example you posted when
League\Oauth2\Client
is pointed to one Composer package, andLeague\Oauth2\Server
is pointed to another. Thats fine.That example works if its the SplClassLoader, if you use the actual example in the spec itself then you'd have to merge the folders. It's still PSR-0.
Everything else is irrelevant, based on your misunderstandings of the above.
Except for:
NOPE. I never did.
I said I could map two different sub-namespaces to two different folders, and it still be perfectly PSR-0 compliant, which is definitely is no matter if I choose to use Composer, SplClassLoader or the example __autoload() function.