Matthew Weier O'Phinney-3 wrote:
>
> At this point, I have no concrete idea of what your setup is.
>
> The following *should* work:
>
> * Directory structure:
>
> application/
> Bootstrap.php
> configs/
> application.ini
> controllers/
> forms/
> models/
> modules/
> lab/
> Bootstrap.php
> configs/
> controllers/
> forms/
> models/
> views/
> views/
>
>
the only difference is mine setup has all default MVC folders in the default
folder inside the modules folder. but i changed that to be the same as yours
already.
/application
/modules
/default
/lab
/...
Matthew Weier O'Phinney-3 wrote:
>
> * Configuration:
> resources.frontController.controllerDirectory = APPLICATION_PATH
> "/controllers"
> resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
> resources.modules[] =
>
hmm resources.modules[] = ???
i tried resources.modules[] = "lab" & resources.modules[] = "lab, library
..."
both does not work it says Uncaught exception 'Zend_Loader_Exception' with
message 'Options must be passed to resource loader constructor' in
D:\_FRAMEWORKS_\_ZF_TRUNK\library\Zend\Loader\Autoloader\Resource.php:75
Stack trace: #0
D:\_FRAMEWORKS_\_ZF_TRUNK\library\Zend\Application\Module\Autoloader.php(45):
Zend_Loader_Autoloader_Resource->__construct(Object(Bootstrap)) #1
D:\_FRAMEWORKS_\_ZF_TRUNK\library\Zend\Application\Resource\Modules.php(83):
Zend_Application_Module_Autoloader ...
Matthew Weier O'Phinney-3 wrote:
>
> * application/modules/lab/Bootstrap.php:
> class Lab_Bootstrap extends Zend_Application_Module_Bootstrap
> {
> }
>
> Let me know if it does not.
>
mine is same yes.
does not work if i put the resources.modules[] = ??? line i get the error as
above if i remove it i get Class 'Lab_Model_Department' not found in ...
so i must still have
$resourceLoader = new Zend_Loader_Autoloader_Resource(array(
'basePath' => APPLICATION_PATH . '/modules/lab',
'namespace' => 'Lab',
));
$resourceLoader->addResourceType('form', 'forms/', 'Form')
->addResourceType('model', 'models/', 'Model');
but i think using application.ini seems better
--
View this message in context:
http://www.nabble.com/Adding-routes-with-application.ini-tp23293676p23342841.html
Sent from the Zend Framework mailing list archive at Nabble.com.