J. Mathew J. Mathew - 2 months ago 7
PHP Question

How to organize all namespaces better?

I am adding in every page manually namespaces, but is there a better way doing it?

use James\Art\AutoLoad;
use James\Art\Search;
use James\Art\Binary;
use James\Art\RD\Test;
use James\Art\RD\UTest;
use James\Art\RD\UTest2;


Thank You!

Answer

Try this:

use James\Art\ {
  Autoload,
  Search,
  Binary,
  RD\Test,
  RD\UTest,
  RD\Utest2
};