/** * Try to load the entries for a given class name into the registry. * * First, figures out the extension the class belongs to. * Then, tries to load the ext_autoload.php file inside the extension directory, and adds its contents to the $classNameToFileMapping. * * @param string $className Class Name */ protected static function attemptToLoadRegistryForGivenClassName($className) { $classNameParts = explode('_', $className); $extensionPrefix = array_shift($classNameParts) . '_' . array_shift($classNameParts); $extensionKey = t3lib_extMgm::getExtensionKeyByPrefix($extensionPrefix); if (!$extensionKey || array_key_exists($extensionKey, self::$extensionHasAutoloadConfiguration)) { // extension key could not be determined or we already tried to load the extension's autoload configuration return; } $possibleAutoloadConfigurationFileName = t3lib_extMgm::extPath($extensionKey) . 'ext_autoload.php'; if (file_exists($possibleAutoloadConfigurationFileName)) { self::$extensionHasAutoloadConfiguration[$extensionKey] = TRUE; $extensionClassNameToFileMapping = (require $possibleAutoloadConfigurationFileName); self::$classNameToFileMapping = array_merge($extensionClassNameToFileMapping, self::$classNameToFileMapping); } else { self::$extensionHasAutoloadConfiguration[$extensionKey] = FALSE; } }