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;
                }
            }
        }
    }
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;
                }
            }
        }
    }
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 ; } } } }
Merge config data with given one
@param array       $data
@param string|null $key
Merge config data with given one