Index: t3lib/class.t3lib_autoloader.php =================================================================== --- t3lib/class.t3lib_autoloader.php (revision 6054) +++ t3lib/class.t3lib_autoloader.php (working copy) @@ -113,11 +113,33 @@ } if (!class_exists($className, false) && !interface_exists($className, false)) { - self::logLoadingFailure($className); + // Last attempt to load the class + if (!self::namingConventionAutoload($className)) { + self::logLoadingFailure($className); + } } } /** + * Autoload function for TYPO3 based on Extbase naming conventions. + * + * @param string $className Class name + * @return boolean TRUE if class could finally be loaded, otherwise FALSE + */ + static protected function namingConventionAutoload($className) { + $classNameParts = explode('_', $className); + if (array_shift($classNameParts) !== 'Tx') { + return; + } + $extensionKey = strtolower(array_shift($classNameParts)); + $classPath = t3lib_extMgm::extPath($extensionKey) . 'Classes/' . implode('/', $classNameParts) . '.php'; + if (file_exists($classPath)) { + t3lib_div::requireFile($classPath); + } + return (class_exists($className, false) || interface_exists($className, false)); + } + + /** * Load the core registry into $classNameToFileMapping, effectively overriding * the whole contents of $classNameToFileMapping. *