Auto Import with aliases

How can i auto import classes forcing alias generation, for example lets say i have:

$a = new \Model\A\MyClass(); // namespace of the class is Model\A
$b = new \Model\B\MyClass(); // namespace of the class is Model\B

auto Import should do something like this:

use Model\A\MyClass as ModelAMyClass;
use Model\B\MyClass as ModelBMyClass;

$a = new ModelAMyClass();
$b = new ModelBMyClass();

1 comment
Comment actions Permalink

There is no such way, and I don't think there ever will be as it seems to make little sense - your aliases names are almost similar to FQCN, they only have slashes dropped.


Please sign in to leave a comment.