示例#1
0
 /**
  * Get the application autoloader
  *
  * This is the autoloader of class Zend_Application_Module_Autoloader.
  * In a default Zend application, there is one.
  * TODO I am not sure about modularized Zend applications - maybe there is
  * one per module, but I don't have a modularized example to test this with
  */
 public static function getApplicationAutoloader()
 {
     if (is_null(self::$autoloader)) {
         $autoloader = Zend_Loader_Autoloader::getInstance();
         $autoloaders = $autoloader->getAutoloaders();
         self::$autoloader = array_reduce($autoloader->getAutoloaders(), function ($u, $v) {
             return $u instanceof Zend_Application_Module_Autoloader ? $u : $v;
         });
     }
     return self::$autoloader;
 }