controller = $controller ?: $GLOBALS['TSFE']; $this->timeTracker = $timeTracker ?: GeneralUtility::makeInstance(TimeTracker::class); } /** * Initialize TypoScriptFrontendController to the point right before rendering of the page is triggered * * @param ServerRequestInterface $request * @param PsrRequestHandlerInterface $handler * @return ResponseInterface */ public function process(ServerRequestInterface $request, PsrRequestHandlerInterface $handler): ResponseInterface { // Starts the template $this->timeTracker->push('Start Template'); $this->controller->initTemplate(); $this->timeTracker->pull(); // Get from cache $this->timeTracker->push('Get Page from cache'); // Locks may be acquired here $this->controller->getFromCache(); $this->timeTracker->pull(); // Get config if not already gotten // After this, we should have a valid config-array ready $this->controller->getConfigArray(); // Setting language and locale $this->timeTracker->push('Setting language and locale'); $this->controller->settingLanguage(); $this->controller->settingLocale(); $this->timeTracker->pull(); // Convert POST data to utf-8 for internal processing if metaCharset is different $this->controller->convPOSTCharset(); $this->controller->initializeRedirectUrlHandlers(); $this->controller->handleDataSubmission(); return $handler->handle($request); } }