Hey All,

I'am trying to call a Module from the Controller and I'm keep on getting an
error stated below:

Class 'Default_Module_UsersTable' not found in
C:\wamp\www\ZendCasts\application\controllers\IndexController.php on line 16

//***********************
//*******Index Controller******
//***********************
class IndexController extends Zend_Controller_Action
{
    public function indexAction()
    {
       $this->view->headTitle('Title - ' , 'PREPEND');

       $users = new Default_Module_UsersTable();
    }   
}
//***********************
//*******Module*******
//***********************
//require_once 'Zend/Db/Table/Abstract.php';
class Default_Module_UsersTable extends Zend_Db_Table_Abstract
{
    /**
     * The default table name
     */
    protected $_name = 'users';

    /*public function NewUser()
    {
        $params = array(
            'name' => 'jane doe',
            'email' => '[email protected]');
        //$this->users->insert($params);
    }*/
}
//***********************
//*******Boot Strap*******
//***********************
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /**
     * Bootstrap autoloader for application resources
     * 
     * @return Zend_Application_Module_Autoloader
     */
    protected function _initAutoload()
    {
        $autoloader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'Default',
            'basePath'  => dirname(__FILE__),
        ));
        return $autoloader;
    }

    /**
     * Bootstrap the view doctype
     * 
     * @return void
     */
    protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
        //$view->addHelperPath('App/View/Helper' , 'App_View_Helper');
    }
}

-- 
View this message in context: 
http://old.nabble.com/Zend-Modules---Calling-a-Module-from-Controller-tp26448979p26448979.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to