This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 29
29
*/
30
30
abstract class Zend_Loader_AutoloaderFactory
31
31
{
32
- const STANDARD_AUTOLOADER = 'Zend_Loader_StandardAutoloader ' ;
32
+ const STANDARD_AUTOLOADER = 'Zend_Loader_StandardAutoloader ' ;
33
+ const CLASS_MAP_AUTOLOADER = 'Zend_Loader_ClassMapAutoloader ' ;
33
34
34
35
/**
35
36
* @var array All autoloaders registered using the factory
@@ -89,6 +90,19 @@ public static function factory($options = null)
89
90
90
91
foreach ($ options as $ class => $ options ) {
91
92
if (!isset (self ::$ loaders [$ class ])) {
93
+ // Check class map autoloader
94
+ if ($ class == self ::CLASS_MAP_AUTOLOADER ) {
95
+ if (!class_exists (self ::CLASS_MAP_AUTOLOADER )) {
96
+ // Extract the filename from the classname
97
+ $ classMapLoader = substr (
98
+ strrchr (self ::CLASS_MAP_AUTOLOADER , '_ ' ), 1
99
+ );
100
+
101
+ require_once dirname (__FILE__ ) . "/ $ classMapLoader.php " ;
102
+ }
103
+ }
104
+
105
+ // Autoload with standard autoloader
92
106
$ autoloader = self ::getStandardAutoloader ();
93
107
if (!class_exists ($ class ) && !$ autoloader ->autoload ($ class )) {
94
108
require_once 'Exception/InvalidArgumentException.php ' ;
You can’t perform that action at this time.
0 commit comments