Issue
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?
Solution
You can do:
$loader->addClassMap(['src\\']);
and this will get you all the files in directory src
(no matter what namespace there will be).
Answered By - kuba
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.