route; } public function getRouteName(): string { return $this->route->getOption('_identifier'); } public function getArguments(): array { return $this->arguments; } public function offsetExists($offset): bool { return $offset === 'route' || isset($this->arguments[$offset]); } public function offsetGet(mixed $offset): mixed { return match ($offset) { 'route' => $this->route, default => $this->arguments[$offset], }; } public function offsetSet(mixed $offset = '', mixed $value = ''): void { switch ($offset) { case 'route': $this->route = $value; break; default: $this->arguments[$offset] = $value; } } public function offsetUnset(mixed $offset): void { switch ($offset) { case 'route': throw new \InvalidArgumentException('You can never unset the Route in a route result', 1669839336); default: unset($this->arguments[$offset]); } } }