Thanks, David. Your examples were clarifying.

I think I was expecting the automapper to create namespace maps for the classes 
under PHPExcel. It looks like composer
might do that if asked, but I haven't tried yet.

> You just use it like you would any old non-namespaced code.

As long as I prefix the class with \ or explicitly "use" the class.

> So that said, you can still use the "use" statement to "import" the 
> PHPExcel_IOFactory into your current scope:
> 
> namespace MyApp;
> 
> use \PHPExcel_IOFactory as ExcelFactory;   <- alias is created
> 
> new ExcelFactory (); // \PHPExcel_IOFactory <- autoloading happens here

This works, too, although the "use" is of dubious value:

namespace MyApp;
use \PHPExcel_IOFactory;

new PHPExcel_IOFactory(); // \PHPExcel_IOFactory

-Brad

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to