Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable my modules in Zend Framework?

I have create a module(person) in my Zend Project. Then created a controller(PersonController.php) in that module. Then created an action (addAction) in that controller. But when I use http://myproject.dev/person/person/add then it shows nothing.

http://myproject.dev/ points to my zendproject's public folder therefore when I use http://myproject.dev/ it shown me index page successfully. But it is not working with my modules.

I have seen somewhere that we have to configure application.ini and Bootstrap.php to tell the zend our module directory but I don't know how. What are these statements ??

My current directory is like this:

zendproject|
           |-> application 
                          |-> models
                          |-> modules
                                     |-> person
                                               |->controllers
                                                              |-> PersonController.php 
like image 359
Awan Avatar asked Dec 07 '22 00:12

Awan


2 Answers

Try to do the next things:
1) application.ini

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = ""

2) Create Bootstrap in each module:

class Person_Bootstrap extends Zend_Application_Module_Bootstrap {
}
like image 198
Alex Pliutau Avatar answered Dec 24 '22 09:12

Alex Pliutau


I think you can simply add module configuration below on your application.ini

resources.modules[] =

Just it.

like image 33
subosito Avatar answered Dec 24 '22 11:12

subosito