title: Zf3: similar Controllers in each module
body: <p>I have different modules in my ZF2 application and each module contains a list of Controllers. Now when in zf2 it was different to create routes and get Entity Manager with service locator. Now in Zf3 we need to add "aliases" and "factories" to use any resources there for when creating routes for each module it is not possible to add same alias for controller even when in different modules;</p>
  
  <p>here is my <strong>application</strong>/ <strong>module.conf.php</strong></p>
  
  <pre><code> 'controllers' =&gt; [
      'factories' =&gt; [
          Controller\IndexController::class =&gt; ServiceLocatorControllerFactory::class,
          Controller\UserController::class =&gt; ServiceLocatorControllerFactory::class,
      ],
      'aliases' =&gt;  [
          'index'     =&gt;  IndexController::class,
          'user'     =&gt;  UserController::class,
      ]
  ],
  </code></pre>
  
  <p>and my <strong>dashboard / module.config.php</strong></p>
  
  <pre><code> "controllers" =&gt; [
      'factories' =&gt; [
          Controller\UserController::class            =&gt; ServiceLocatorControllerFactory::class,
          Controller\WidgetController::class          =&gt; ServiceLocatorControllerFactory::class,
      ],
      'aliases' =&gt;  [
          "user"          =&gt; UserController::class,
          "widget"            =&gt; WidgetController::class,
      ]
  ],
  </code></pre>
  
  <p>now when i try to access <strong><em>/application/user/index</em></strong></p>
  
  <p>it goes to  Dashboard => UserController => IndexAction</p>
  
  <p>instead of Application => UserController => IndexAction</p>
  
  <p>The solution that i have now is to create manually routes for each controller, which is really hard in my case as the application is really big and there are 100's of controller. plus it is kinda redundent task to write every route. Is there anyway to solve the issue</p>