How to setup phpexcel in namespace

Hi all Directories phpexcel in app/library/PHPExcel, and file loader.php contain $loader = new \Phalcon\Loader();

/** * We're a registering a set of directories taken from the configuration file */ $loader->registerNamespaces(array( 'Eduapps\Models' => $config->application->modelsDir, 'Eduapps\Controllers' => $config->application->controllersDir, 'Eduapps\Forms' => $config->application->formsDir, 'Eduapps' => $config->application->libraryDir ));

$loader->register(); and in files PHPExcel.php <?php namespace Eduapps\PHPExcel; but run public function excelAction() { $excel = new PHPExcel(); Fatal error: Class 'Eduapps\PHPExcel\PHPExcel%5FCalculation' not found in /home/opensue/www/eduapps/app/library/PHPExcel/PHPExcel.php on line 124 and tries namespace Eduapps\PHPExcel in file Calculation.php has not been

Just register the directory.


$loader->registerDirs( array( $config->application->libraryDir."PHPExcel/" ) );


$excel = new PHPExcel();



Thank Douglas Bezerra Possas but i use $loader->registerNamespaces, and i slove problem above

Can you explain how to solve this problem?

Hello. This link is the solution.

> Can you explain how to solve this problem? > > — > Reply to this email directly or view the complete thread on Phosphorum > <>. > Change your e-mail preferences here <> >

-- Douglas Bezerra Possas