'value', ...]] */ public function __construct(array $array, public ?string $serverName = null) { $this->status = $array[0]; switch ($this->status) { case Dispatcher::METHOD_NOT_ALLOWED: $this->params = $array[1]; break; case Dispatcher::FOUND: $this->handler = $array[1]; $this->params = $array[2]; break; } } public function isFound(): bool { return $this->status === Dispatcher::FOUND; } public function isNotFound(): bool { return $this->status === Dispatcher::NOT_FOUND; } }