method; } public function getPath(): string { return $this->path; } public function getHandler(): string|callable { return $this->handler; } public function getName(): ?string { return $this->name; } public function getMiddleware(): array { return $this->middleware; } public function getValidation(): array { return $this->validation; } public function getDefaults(): array { return $this->defaults; } public function getModule(): ?string { return $this->module; } public function getAttributes(): array { return $this->attributes; } public function toArray(): array { return [ 'method' => $this->method, 'pattern' => $this->pattern, 'path' => $this->path, 'handler' => $this->handler, 'name' => $this->name, 'middleware' => $this->middleware, 'validation' => $this->validation, 'defaults' => $this->defaults, 'module' => $this->module, 'attributes' => $this->attributes ]; } }