title: Using Zend_Controller_Route to automatically determine the controller based on the user role: how?
body: <p>I am currently figuring out a way to the the above. </p>
  
  <p>My current application structure is as follows:</p>
  
  <pre><code>/modules
   / modulename
    /controllers
      /ProjectController.php
  </code></pre>
  
  <p>The application has 3 different user roles, each with functionality contained within these modules. I'd like to prevent having multiple actions for each user role in one controller as I think it makes my code less readable and ugly. So, I was thinking about a structure like this:</p>
  
  <pre><code>/modules
   / modulename
    /controllers
      /ProjectController.php
      /EmployeeProjectController.php
      /ExecutiveProjectController.php
  </code></pre>
  
  <p>This should work as follows:</p>
  
  <ul>
  <li>Projectcontroller.php should be loaded for admin users</li>
  <li>EmployeeProjectController.php should be loaded for employees</li>
  <li>ExecutiveProjectController.php should be loaded for executives</li>
  </ul>
  
  <p>Of course, I could relatively easy a different URL scheme to provide for this for each user role, but <em>I do not want this</em>. I want a uniform URL scheme. </p>
  
  <p>Next step would then be to create routes for each of the controllers to rewrite them to another controller. <em>I'd like to prevent this as well.</em></p>
  
  <p><strong>I want a way to globally tell the router to prefix controllers with 'Executive' or 'Employee' or whatever, based on the user role.</strong></p>
  
  <p>What would be the best way to this?</p>