On 01/13/2011 04:24 PM, Sri Rao wrote:
How to make the zf not create controllers, views, models etc directories
under application but instead create it under default module as shown above?

Consider the following directory structure:
|-- application
|   |-- Bootstrap.php
|   |-- configs
|   |   `-- application.ini
|   `-- controllers
| | `-- IndexController.php <- the default home page controller ("/default/index/index")
|   `-- modules
|   |   `-- login
|   |   |   `-- controllers
|   |   |   |   |-- IndexController.php <- login home page 
("/login/index/index")
|   |   |   |   `-- LoginController.php
|   |   |   `-- models
|   |   |   |   |-- SomeModel.php
|   |   |   |   `-- Login.php
|   |   |   `-- views
|   |   |       `-- scripts
|   |   |           |-- index
|   |   |           |   `-- index.phtml
|   |   |           `-- login
|   |   |               `-- index.phtml
|   |   `-- user
|   |       |-- controllers
|   |       |   `-- IndexController.php
|   |       |    -- ProfileController.php
|   |       `-- models
|   |       |   `-- User.php
|   |       |    -- Profile.php
|   |       `-- views
|   |           `-- scripts
|   |               |-- index
|   |               |   `-- index.phtml
|   |               `-- profile
|   |                   `-- index.phtml
|   |   `-- ... (continues structure)
|   `-- views
|       `-- scripts
|           `-- index
|               `-- index.phtml

...where application-specific functions are located in the application directory, structured in such a way that allows you to store the default controllers, models and views in the root of the application, and the modules are stored in their own separate directory.

Hope this helps,
-Kizano
//-----
Information Security
eMail: [email protected]
http://www.markizano.net/

Reply via email to