web/lib/Zend/Loader/AutoloaderFactory.php
changeset 1230 68c69c656a2c
parent 808 6b6c2214f778
--- a/web/lib/Zend/Loader/AutoloaderFactory.php	Thu May 07 15:10:09 2015 +0200
+++ b/web/lib/Zend/Loader/AutoloaderFactory.php	Thu May 07 15:16:02 2015 +0200
@@ -14,7 +14,7 @@
  *
  * @category   Zend
  * @package    Zend_Loader
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
@@ -24,12 +24,13 @@
 
 /**
  * @package    Zend_Loader
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 abstract class Zend_Loader_AutoloaderFactory
 {
-    const STANDARD_AUTOLOADER = 'Zend_Loader_StandardAutoloader';
+    const STANDARD_AUTOLOADER  = 'Zend_Loader_StandardAutoloader';
+    const CLASS_MAP_AUTOLOADER = 'Zend_Loader_ClassMapAutoloader';
 
     /**
      * @var array All autoloaders registered using the factory
@@ -89,6 +90,19 @@
 
         foreach ($options as $class => $options) {
             if (!isset(self::$loaders[$class])) {
+                // Check class map autoloader
+                if ($class == self::CLASS_MAP_AUTOLOADER) {
+                    if (!class_exists(self::CLASS_MAP_AUTOLOADER)) {
+                        // Extract the filename from the classname
+                        $classMapLoader = substr(
+                            strrchr(self::CLASS_MAP_AUTOLOADER, '_'), 1
+                        );
+
+                        require_once dirname(__FILE__) . "/$classMapLoader.php";
+                    }
+                }
+
+                // Autoload with standard autoloader
                 $autoloader = self::getStandardAutoloader();
                 if (!class_exists($class) && !$autoloader->autoload($class)) {
                     require_once 'Exception/InvalidArgumentException.php';