Project

General

Profile

Feature #21144 ยป 12067.diff

Administrator Admin, 2009-09-25 22:05

View differences:

t3lib/class.t3lib_autoloader.php (working copy)
}
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.
*
    (1-1/1)