I started with a new Project, and still getting the same Error, and I think I have made all the suggested changes.
Here is my Application.ini file:
[production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 1
resources.modules[] = ""
resources.frontController.params.displayExceptions = 1
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
My Application directory bootstrap is configured as below:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {
public function _initAutoload() {
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => '' ,
'basePath' => dirname(__FILE__) . '/modules/'));
return $autoloader;
}
}
The Bootstrap in my Module is:
<?php
class Module1_Bootstrap extends Zend_Application_Module_Bootstrap
{
}
My books Model: Books.php
<?php
class module1_Model_Books
{
private $_name="";
}
and My testController..
<?php
class Module1_TestController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
}
public function booksAction()
{
// action body
$myBooks= new module1_Model_Books();
}
}
Here is my file layout, project was built using Zend Tools:
C:\wamp\www\modules\.zfproject.xml
C:\wamp\www\modules\application
C:\wamp\www\modules\docs
C:\wamp\www\modules\library
C:\wamp\www\modules\nbproject
C:\wamp\www\modules\output.txt
C:\wamp\www\modules\public
C:\wamp\www\modules\tests
C:\wamp\www\modules\application\Bootstrap.php
C:\wamp\www\modules\application\configs
C:\wamp\www\modules\application\controllers
C:\wamp\www\modules\application\models
C:\wamp\www\modules\application\modules
C:\wamp\www\modules\application\views
C:\wamp\www\modules\application\configs\application.ini
C:\wamp\www\modules\application\controllers\ErrorController.php
C:\wamp\www\modules\application\controllers\IndexController.php
C:\wamp\www\modules\application\modules\module1
C:\wamp\www\modules\application\modules\module1\controllers
C:\wamp\www\modules\application\modules\module1\models
C:\wamp\www\modules\application\modules\module1\views
C:\wamp\www\modules\application\modules\module1\controllers\TestController.php
C:\wamp\www\modules\application\modules\module1\models\Books.php
C:\wamp\www\modules\application\modules\module1\views\filters
C:\wamp\www\modules\application\modules\module1\views\helpers
C:\wamp\www\modules\application\modules\module1\views\scripts
C:\wamp\www\modules\application\modules\module1\views\scripts\test
C:\wamp\www\modules\application\modules\module1\views\scripts\test\Books.phtml
C:\wamp\www\modules\application\modules\module1\views\scripts\test\index.phtml
C:\wamp\www\modules\application\views\helpers
C:\wamp\www\modules\application\views\scripts
C:\wamp\www\modules\application\views\scripts\error
C:\wamp\www\modules\application\views\scripts\index
C:\wamp\www\modules\application\views\scripts\test
C:\wamp\www\modules\application\views\scripts\error\error.phtml
C:\wamp\www\modules\application\views\scripts\index\index.phtml
C:\wamp\www\modules\application\views\scripts\test\books.phtml
C:\wamp\www\modules\docs\README.txt
C:\wamp\www\modules\nbproject\private
C:\wamp\www\modules\nbproject\project.properties
C:\wamp\www\modules\nbproject\project.xml
C:\wamp\www\modules\nbproject\private\private.properties
C:\wamp\www\modules\public\.htaccess
C:\wamp\www\modules\public\index.php
C:\wamp\www\modules\tests\application
C:\wamp\www\modules\tests\library
C:\wamp\www\modules\tests\phpunit.xml
C:\wamp\www\modules\tests\application\bootstrap.php
C:\wamp\www\modules\tests\application\controllers
C:\wamp\www\modules\tests\application\controllers\TestControllerTest.php
C:\wamp\www\modules\tests\library\bootstrap.php
And my LOVELY Error brought to me by WAMP:
[Tue Mar 30 07:19:05 2010] [error] [client 127.0.0.1] PHP Fatal error: Class 'module1_Model_Books' not found in C:\\wamp\\www\\modules\\application\\modules\\module1\\controllers\\TestController.php on line 21
I'm going to read up more on the AutoLoader, but it really seems like Zend should be able to find this Model that is in the Module I'm working on..
And, I appreciate everyone's help