data = $data; $this->id = $id; $this->root = $root; $this->base = $base; $this->path = $path; $this->draft = $draft; } public function id(): ?Uri { return $this->id; } public function root(): ?Uri { return $this->root; } public function base(): ?Uri { return $this->base; } public function draft(): ?string { return $this->draft; } public function data() { return $this->data; } public function path(): array { return $this->path; } /** * Returns first non-null property: id, base or root * @return Uri|null */ public function idBaseRoot(): ?Uri { return $this->id ?? $this->base ?? $this->root; } public function isBoolean(): bool { return is_bool($this->data); } public function isObject(): bool { return is_object($this->data); } public function isDocumentRoot(): bool { return $this->id && !$this->root && !$this->base; } }