Search code examples
phpzend-framework

Zend_Tool multiple .zfproject.xml


I need to create custom folder to put multiple applications and get Zend_Tool to working:

applications 
|- frontend
   |- configs
   |- controllers
   |- models
   |- tests
   |- views
   |- .zfproject.xml
   |- Bootstrap.php
|- backend
   |- configs
   |- controllers
   |- models
   |- tests
   |- views
   |- .zfproject.xml
   |- Bootstrap.php
system
public
docs

How to get this?


Solution

  • use create module command

    zf create module frontend
    zf create module backend
    

    After it your folder structurer will be following.

    applications
         configs  
         controllers  
         models  
         modules  
           |- frontend
             |- configs
             |- controllers
             |- models
             |- tests
             | - views             
             |- Bootstrap.php
           |- backend
             |- configs
             |- controllers
             |- models
             |- tests
             |- views            
             |- Bootstrap.php
         views    
    system
    public
    docs
    

    I think it is good structure for project. Also you can use default module as a front end or backend.