Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

How to enable my modules in Zend Framework

By: a guest on Feb 22nd, 2012  |  syntax: None  |  size: 0.93 KB  |  views: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. zendproject|
  2.            |-> application
  3.                           |-> models
  4.                           |-> modules
  5.                                      |-> person
  6.                                                |->controllers
  7.                                                               |-> PersonController.php
  8.        
  9. resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
  10. resources.modules[] = ""
  11.        
  12. class Person_Bootstrap extends Zend_Application_Module_Bootstrap {
  13. }
  14.        
  15. resources.modules[] =
  16.        
  17. $frontController = Zend_Controller_Front::getInstance();
  18. $frontController->throwExceptions(true);
  19. $frontController->returnResponse(true);
  20. $frontController->setControllerDirectory(
  21.             array(
  22.                 'default' => '/path/to/application/controllers',
  23.                 'person' => 'path/to/application/person/controllers'
  24.             )
  25.         );
  26. $response = $frontController->dispatch();
  27. $response->sendResponse();