/** * Get all the complex data for the loader. * This return value will be cached and stored in the database * There is no file monitoring for this cache * * @param Loader $loader * @param int $type * * @return array */ public function prepareLoader(Loader $loader, $type) { $classNames = []; $alternativeImpPath = ExtensionManagementUtility::extPath($loader->getExtensionKey()) . 'Classes/AlternativeImplementations/'; $alternativeClasses = FileUtility::getBaseFilesInDir($alternativeImpPath, 'php'); foreach ($alternativeClasses as $aic) { $aicClass = ClassNamingUtility::getFqnByPath($loader->getVendorName(), $loader->getExtensionKey(), 'AlternativeImplementations/' . $aic); if (!$loader->isInstantiableClass($aicClass)) { continue; } $classNames[] = ['originalName' => ReflectionUtility::getParentClassName($aicClass), 'alternativeClassName' => $aicClass]; } return $classNames; }
/** * Get all the complex data for the loader. * This return value will be cached and stored in the database * There is no file monitoring for this cache * * @param Loader $loader * @param int $type * * @return array */ public function prepareLoader(Loader $loader, $type) { $classNames = []; $alternativeImpPath = ExtensionManagementUtility::extPath($loader->getExtensionKey()) . 'Classes/AlternativeImplementations/'; $alternativeClasses = FileUtility::getBaseFilesInDir($alternativeImpPath, 'php'); $extKey = GeneralUtility::underscoredToUpperCamelCase($loader->getExtensionKey()); foreach ($alternativeClasses as $aic) { $aicClass = $loader->getVendorName() . '\\' . $extKey . '\\AlternativeImplementations\\' . $aic; if (!$loader->isInstantiableClass($aicClass)) { continue; } $classNames[] = ['originalName' => ReflectionUtility::getParentClassName($aicClass), 'alternativeClassName' => $aicClass]; } return $classNames; }
/** * Get all the complex data for the loader. * This return value will be cached and stored in the database * There is no file monitoring for this cache * * @param Loader $loader * @param int $type * * @return array */ public function prepareLoader(Loader $loader, $type) { $return = []; if ($type === LoaderInterface::EXT_TABLES) { return $return; } $xClassesPath = ExtensionManagementUtility::extPath($loader->getExtensionKey()) . 'Classes/Xclass/'; $xClasses = FileUtility::getBaseFilesRecursivelyInDir($xClassesPath, 'php'); foreach ($xClasses as $xClass) { $className = ClassNamingUtility::getFqnByPath($loader->getVendorName(), $loader->getExtensionKey(), 'Xclass/' . $xClass); if (!$loader->isInstantiableClass($className)) { continue; } $return[] = ['source' => ReflectionUtility::getParentClassName($className), 'target' => $className]; } return $return; }
/** * Get all the complex data for the loader. * This return value will be cached and stored in the database * There is no file monitoring for this cache * * @param Loader $loader * @param int $type * * @return array */ public function prepareLoader(Loader $loader, $type) { $return = []; if ($type === LoaderInterface::EXT_TABLES) { return $return; } $xClassesPath = ExtensionManagementUtility::extPath($loader->getExtensionKey()) . 'Classes/Xclass/'; $xClasses = FileUtility::getBaseFilesRecursivelyInDir($xClassesPath, 'php'); $extKey = GeneralUtility::underscoredToUpperCamelCase($loader->getExtensionKey()); foreach ($xClasses as $xClass) { $xclassName = $loader->getVendorName() . '\\' . $extKey . '\\Xclass\\' . str_replace('/', '\\', $xClass); if (!$loader->isInstantiableClass($xclassName)) { continue; } $return[] = ['source' => ReflectionUtility::getParentClassName($xclassName), 'target' => $xclassName]; } return $return; }