entryPointManager = $entryPointManager; $this->applicationUser = $applicationUser; $this->authRequired = $authRequired; $this->authNotStrict = $authNotStrict; $this->entryPoint = $entryPoint; $this->data = $data; } public function process(string $entryPoint, Request $request, Response $response, ?StdClass $data) { $authentication = $this->injectableFactory->createWith(Authentication::class, [ 'allowAnyAccess' => $this->authNotStrict, ]); $apiAuth = ApiAuth::createForEntryPoint($authentication, $this->authRequired); $apiAuth->process($request, $response); if (!$apiAuth->isResolved()) { return; } if ($apiAuth->isResolvedUseNoAuth()) { $this->applicationUser->setupSystemUser(); } ob_start(); $this->entryPointManager->run($entryPoint, $request, $response, $data); $contents = ob_get_clean(); if ($contents) { $response->writeBody($contents); } } }