If I have some php classes inside a namespace com\test
and want to import all of them into another php file how can do that?
use com\test\ClassA
use com\test\ClassB
...
use com\test\*
give me syntax error.
If I have some php classes inside a namespace com\test
and want to import all of them into another php file how can do that?
use com\test\ClassA
use com\test\ClassB
...
use com\test\*
give me syntax error.
I think you can't do such thing.
You can do:
use com\test
and refer to your classes at later time as:
test\ClassA
test\ClassB
This should work:
use com\test;
$a = new \test\ClassA;
$b = new \test\ClassB;
or
use com\test\ClassA as ClassA;
use com\test\ClassB as ClassB;
$a = new ClassA;
$b = new ClassB;