getClassName($name); if (!$className) { throw new NotFoundSilent("Entry point '{$name}' not found."); } $noAuth = false; if (isset($className::$noAuth)) { $noAuth = $className::$noAuth; } if ($noAuth) { return false; } // for backward compatibility return $className::$authRequired ?? true; } /** * @throws NotFound */ public function run(string $name, Request $request, Response $response): void { $className = $this->getClassName($name); if (!$className) { throw new NotFoundSilent("Entry point '{$name}' not found."); } $entryPoint = $this->injectableFactory->create($className); $entryPoint->run($request, $response); } /** * @return ?class-string */ private function getClassName(string $name): ?string { /** @var ?class-string */ return $this->classFinder->find('EntryPoints', ucfirst($name)); } }