public function merge($data = [], $key = null) {
        if (!isset($key)) {
            $this->data = ArrayHelper::merge($this->data, $data);
        } else {
            if (!isset($this->data[$key])) {
                $this->data[$key] = $data;
            } else {
                if (is_array($this->data[$key])) {
                    $this->data[$key] = ArrayHelper::merge($this->data[$key], $data);
                } else {
                    $this->data[$key] = $data;
                }
            }
        }
    }