*/
protected function getCaseInsensitiveControllers()
{
- $data = [
- 'lookup' => [],
- 'reverse' => [],
- ];
+ $data = [];
if (!PACKAGE_ID) {
return $data;
$applications = ApplicationHandler::getInstance()->getApplications();
foreach ($applications as $application) {
$abbreviation = $application->getAbbreviation();
+
+ $data[$abbreviation] = ['acp' => [], 'frontend' => []];
+ $this->brokenControllers['lookup'][$abbreviation] = [];
+ $this->brokenControllers['reverse'][$abbreviation] = [];
+
$directory = Application::getDirectory($abbreviation);
foreach (['lib', 'lib/acp'] as $libDirectory) {
foreach (['action', 'form', 'page'] as $pageType) {
$ciController = \implode('-', \array_map('strtolower', $parts));
$className = $abbreviation . '\\' . ($libDirectory === 'lib/acp' ? 'acp\\' : '') . $pageType . '\\' . $filename;
- if (!isset($data['lookup'][$abbreviation])) {
- $data['lookup'][$abbreviation] = ['acp' => [], 'frontend' => []];
- }
- $data['lookup'][$abbreviation][$libDirectory === 'lib' ? 'frontend' : 'acp'][$ciController] = $className;
- $data['reverse'][$filename] = $ciController;
+ $data[$abbreviation][$libDirectory === 'lib' ? 'frontend' : 'acp'][$ciController] = $className;
if ($isBrokenController) {
- if (!isset($this->brokenControllers['lookup'][$abbreviation])) {
- $this->brokenControllers['lookup'][$abbreviation] = [];
- }
$this->brokenControllers['lookup'][$abbreviation][$ciController] = $className;
-
- if (!isset($this->brokenControllers['reverse'][$abbreviation])) {
- $this->brokenControllers['reverse'][$abbreviation] = [];
- }
$this->brokenControllers['reverse'][$abbreviation][\preg_replace(
'~(?:Page|Form|Action)$~',
'',
protected function getLegacyClassData($application, $controller, $isAcpRequest)
{
$environment = $isAcpRequest ? 'acp' : 'frontend';
- if (isset($this->ciControllers['lookup'][$application][$environment][$controller])) {
- $className = $this->ciControllers['lookup'][$application][$environment][$controller];
+ if (isset($this->ciControllers[$application][$environment][$controller])) {
+ $className = $this->ciControllers[$application][$environment][$controller];
if (\preg_match('~\\\\(?P<controller>[^\\\\]+)(Action|Form|Page)$~', $className, $matches)) {
return [