-- cc96ai <[EMAIL PROTECTED]> wrote
(on Friday, 07 December 2007, 08:46 AM -0800):
>
> I have a working code in non-module structure.
> -application
> - controllers
> - IndexController.php
> - AuthController.php
> - views
> - ...
>
> I try to separate into module sturcture
> - application
> - modules
> - default
> - controllers
> - IndexController.php
> - AuthController.php
> - admin
> - controllers
> - ....
>
>
> so I update the code
> $frontController->setControllerDirectory('./application/controllers')
>
> to
> $frontController->setControllerDirectory(array('default' =>
> realpath('./application/modeles/controllers/default'),
> 'admin' =>
> realpath('./application/modeles/controllers/admin')
> ))
You've set your paths wrong there; 'modeles' should be 'modules', based
on the directory schema you gave, and instead of
.../modules/controllers/default, .../modules/default/controllers (notice
that you had controllers and the module name switched).
By the way, there's an easier way to do this:
$frontController->addModuleDirectory('./application/modules');
this method traverses the directory specified, and adds any subdirectory
containing a 'controllers' subdir as a module, pointing to that
controllers subdirectory.
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/