I have PHP classes to handle AJAX calls, through a PHP controller.
There are lots of them, all pretty big.
They are in the classes/Core/internalApi/
directory.
I use a composer.json
to handle path :
"autoload": {
"psr-4": {
"Core\\": "classes/Core/"
}
}
I don't want to have tenths of use Core\internalAPI\phpClass
in my controller.
I've tried (with no success) all possible combinations of the following :
JSON:
""
"internalAPI\\": "classes/Core/internalAPI"
use:
use [[[\]classes][\]Core][\]internalAPI;
call:
[[[\]classes][\]Core][\]internalAPI\phpClass[\phpClass]::func();
Note that I did not forget to run composer update
nor composer dump-autoload
And this is not a problem with non-static methods called statically, or anything like that.
What I would like to do :
Have a namespace for classes/Core/internalAPI
Calling functions with internalAPI\fileName\classname::func()