|
|
@@ -29,7 +29,8 @@ if (class_exists('Zend_Loader_AutoloaderFactory')) return;
|
|
|
*/
|
|
|
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 @@ abstract class Zend_Loader_AutoloaderFactory
|
|
|
|
|
|
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';
|