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;
    }
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;
    }
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 ; }
Set array.

@param mixed[] $data
@param bool $doMerge
@return $this
Set array .