Reputation: 4098
I am currently doing something like this:
$loader->addPsr4('Application\\Config\\', __DIR__ . '/../config/test');
This means I can do any file in the directory test
with namespace Application\Config\
.
Is it possible to a similar setup/trick to do this for the global namespace?
Upvotes: 0
Views: 498
Reputation: 3870
You can do:
$loader->addClassMap(['src\\']);
and this will get you all the files in directory src
(no matter what namespace there will be).
Upvotes: 2