context = Context::init($url); } protected function isCurrentPageAllowed(): bool { foreach ($this->context->navigation as $navigationEntry) { if ($navigationEntry->url === $this->context->currentPage) { return true; } } return false; } public final function run(): Sendable { if (!$this->isCurrentPageAllowed()) { return new AccessDeniedPage($this->context); } return $this->runLogic(); } abstract protected function runLogic(): Sendable; }