title: Couldnt call A Model Class in Another Module From Default Module?
body: <p>My application has the structure :</p>
  
  <pre><code>myapp
  
   - applcation
      - modules
         - default
            - controllers
            - models
                - Acl.php
            - views
            - Bootstrap.php
         - admin
            - controllers
            - models
                - ResourceMapper.php
                - RoleMapper.php
  
            - views
            - Bootstrap.php
      - helpers
      - layout
   - library
   - index.php
  </code></pre>
  
  <p>I want to call classes in the Models folder in admin-module from Acl.php (in the default module). Here my code :</p>
  
  <pre><code>class Model_Acl extends Zend_Acl
  {
      public $_roleModelMapper;
      public $_resourceModelMapper;
  
      function init(){
          $this-&gt;_roleModelMapper = new Admin_Model_RoleMapper();
          $this-&gt;_resourceModelMapper = new Admin_Model_ResourceMapper();
      }
  
      public function initRole(){
  
          $roles = $this-&gt;_roleModelMapper-&gt;fetchAll();
          foreach ($roles as $role){
              $this-&gt;addRole($role-&gt;getRole());
          }
      }
      public function initResource(){
          $resources = $this-&gt;_resourceModelMapper-&gt;fetchAll();
          foreach ($resources as $resource){
              if ($resource-&gt;getParent()==''){
                  $this-&gt;add(new Zend_Acl_Resource($resource-&gt;getResource()));
              }else{
                  $this-&gt;add(new Zend_Acl_Resource($resource-&gt;getResource()),$resource-&gt;getParent());
              }
          }
      }
  
      public function __construct()
      {
          self::init();
          //init role
          self::initRole();
  
          //init resource
          self::initResource();
  
          //other code here
      }
  }
  </code></pre>
  
  <p>But I had error like this: </p>
  
  <pre><code>Fatal error: Class 'Admin_Model_RoleMapper' not found in C:\xampp\htdocs\test2\application\modules\default\models\Acl.php on line ...
  </code></pre>
  
  <p>Here my application\Bootstrap.php :</p>
  
  <pre><code>&lt;?php
  class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
  
      private $_acl = null;
      private $_auth = null;
  
      public function _initAutoload()
      {
          $modelLoader = new Zend_Application_Module_Autoloader(array(
              'namespace' =&gt; '',
              'basePath' =&gt; APPLICATION_PATH . "/modules/default",
              ));
  
              //$this-&gt;_acl = new Model_Acl();
              $this-&gt;_acl = new Model_Acl();
              $this-&gt;_auth = Zend_Auth::getInstance();
  
              if($this-&gt;_auth-&gt;hasIdentity()){
                  Zend_Registry::set('role',$this-&gt;_auth-&gt;getStorage()-&gt;read()-&gt;role);
              }else{
                  Zend_Registry::set('role','GUEST');
              }
  
              $frontController = Zend_Controller_Front::getInstance();
              $frontController-&gt;registerPlugin(new Plugin_AccessCheck($this-&gt;_acl));
  
              return $modelLoader;
      }
  
   } 
  ?&gt;
  </code></pre>
  
  <p>My application.ini does have :</p>
  
  <pre><code>resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
  resources.modules = ""
  </code></pre>
  
  <p>So what's wrong with my code? Please help me.
  Regards.</p>