I have following structure in my Zend-Project :
-application
- PDF
- configs
- controllers
- models
- views
- Bootstrap.php
-library
-public
-tests
I have created a new folder PDF inside application folder. And I have write some classes inside it[PDF].
What I want is to access this classes inside the indexAction() of the IndexController, but it showing an error like :
"Class 'Application_PDF_FormDocument' not found in D:\xampp\htdocs\zendapp\application\controllers\IndexController.php on line 13"
What may be the possible reason?
Please provide some help.....
Thanks In Advance......
I agree with ChanibaL regarding the naming of your classes. you should be naming it PDF_FormDocumnet. Next, in application.ini, regerster the namespace:
autoloaderNamespaces[] = "PDF_"
Lastly, in your index.php make sure you are adding it to the include path:
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
realpath(APPLICATION_PATH),
get_include_path(),
)));
That should do the trick