/** * Creates an AutoloadAPI instance * * @param String $classname Either AutoloadAPI or AutoloadAPI_Old * * @see AutoloadAPI_Constructable * @see AutoloadAPI_Old_Constructable * @return AutoloadAPI */ private function _getAutoloadAPI($classname) { if (version_compare(PHP_VERSION, "5.2.11", '<')) { return AutoloadAPI::getInstance(); } $classname .= "_Constructable"; return new $classname(); }
/** * Returns all registered Autoloader instances which are doing their jobs * * @see AutoloadAPI::getRegisteredAutoloaders() * @see register() * @return Array */ public static function getRegisteredAutoloaders() { $autoloaders = array(); $callbacks = AutoloadAPI::getInstance()->getRegisteredAutoloaders(); foreach ($callbacks as $callback) { if (!is_array($callback)) { continue; } //TODO use static:: in PHP 5.3 and remove the other implementations if (!$callback[0] instanceof self) { continue; } $autoloaders[] = $callback[0]; } return $autoloaders; }