title: Loading Modules which has multiple module in Zend Framework 2
body: <p><strong>Issues</strong></p>
  
  <p>So I try to decouple my application to multiple module project ( each has its own <strong>composer.json</strong> ), then the real application will load all this project through composer</p>
  
  <p>Each of this module project will have a user-interface accessible through browser and can start individually, so it's not just a simple library. This file will exist on each module project:</p>
  
  <ul>
  <li>config/application.config.php</li>
  <li>public/index.php</li>
  </ul>
  
  <p>Example Module ( Dependency is what I write in module array in application.config.php ):</p>
  
  <ul>
  <li>UIModule
  
  <ul>
  <li>Dependency : AssetManager, UIModule</li>
  </ul></li>
  <li>CMSModule
  
  <ul>
  <li>Dependency : UIModule, CMSModule</li>
  </ul></li>
  <li>AccountingModule:
  
  <ul>
  <li>Dependency : UIModule, AccountingModule</li>
  </ul></li>
  </ul>
  
  <p>Now in my final application lets say <strong>MyApplication</strong> it need both <strong>CMSModule</strong> and <strong>AccountingModule</strong>, but I cannot write only just this two module in application.config.php. Instead I have to write:</p>
  
  <ul>
  <li>AssetManager -> this should be load by UIModule</li>
  <li>UIModule -> this should be load by CMS/Accounting Module</li>
  <li>CMSModule</li>
  <li>AccountingModule</li>
  </ul>
  
  <p>I should only require to write this two in <strong>MyApplication</strong></p>
  
  <ul>
  <li>CMSModule</li>
  <li>AccountingModule</li>
  </ul>
  
  <p>Is this can be done ? which I think what this guy want to achieve in <a href="https://stackoverflow.com/questions/45295059/loading-modules-dynamically-in-zend-framework-2">Loading Modules Dynamically in Zend Framework 2</a></p>
  
  <p>Something like this, I add another additional module.
  <a href="https://i.stack.imgur.com/3It4D.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3It4D.jpg" alt="decouple module"></a></p>