public function setArray(array $data, bool $doMerge = false): self
    {
        if ($doMerge) {
            foreach ($data as $key => $value) {
                $this->data[$key] = $value;
            }
        } else {
            $this->data = $data;
        }
        return $this;
    }