PluginProbe
CSS & JavaScript Toolbox / trunk
CSS & JavaScript Toolbox vtrunk
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | framework/autoload/loader.php +14 -1 11.2trunk View file →
@@ -71,9 +71,22 @@
71 71 self::$instances[$prefix] = new CJT_Framework_Autoload_Loader($prefix, $path);
72 72 }
73 73 return isset(self::$instances[$prefix]) ? self::$instances[$prefix] : null;
74 74 }
75 -
75 +
76 + /**
77 + * Get an already registered loader by its exact prefix.
78 + *
79 + * Unlike autoLoad() this never registers anything, so it is safe to call
80 + * with a prefix that came from the request.
81 + *
82 + * @param string $prefix Loader prefix to look up.
83 + * @return CJT_Framework_Autoload_Loader|null Loader when registered, NULL otherwise.
84 + */
85 + public static function getRegisteredLoader($prefix) {
86 + return isset(self::$instances[$prefix]) ? self::$instances[$prefix] : null;
87 + }
88 +
76 89 /**
77 90 * Find ClassAutoloader instance used for loading specific class.
78 91 *
79 92 * The method is using Prefix algorithm for finding class autoloader