2 namespace TYPO3\CMS\Extbase\Mvc;
71 $suitableRequestHandlers = array();
72 foreach ($availableRequestHandlerClassNames as $requestHandlerClassName) {
73 $requestHandler = $this->objectManager->get($requestHandlerClassName);
74 if ($requestHandler->canHandleRequest()) {
75 $priority = $requestHandler->getPriority();
76 if (isset($suitableRequestHandlers[$priority])) {
77 throw new \TYPO3\CMS\Extbase\Mvc\Exception(
'More than one request handler with the same priority can handle the request, but only one handler may be active at a time!', 1176475350);
79 $suitableRequestHandlers[$priority] = $requestHandler;
82 if (empty($suitableRequestHandlers)) {
83 throw new \TYPO3\CMS\Extbase\Mvc\Exception(
'No suitable request handler found.', 1205414233);
85 ksort($suitableRequestHandlers);
86 return array_pop($suitableRequestHandlers);
96 $settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
97 return is_array($settings[
'mvc'][
'requestHandlers']) ? $settings[
'mvc'][
'requestHandlers'] : array();