public function merge($key, $value = null)
    {
        if (is_array($key)) {
            $this->elements = array_merge($this->elements, $key);
        } elseif (is_string($key)) {
            $items = (array) $this->get($key);
            $value = array_merge($items, $this->getArrayItems($value));
            $this->set($key, $value);
        } elseif ($key instanceof self) {
            $this->elements = array_merge($this->elements, $key->all());
        }
    }
public function merge($key, $value = null)
    {
        if (is_array($key)) {
            $this->elements = array_merge($this->elements, $key);
        } elseif (is_string($key)) {
            $items = (array) $this->get($key);
            $value = array_merge($items, $this->getArrayItems($value));
            $this->set($key, $value);
        } elseif ($key instanceof self) {
            $this->elements = array_merge($this->elements, $key->all());
        }
    }
public function merge ( $ key , $ value = null ) { if ( is_array ( $ key ) ) { $ this -> elements = array_merge ( $ this -> elements , $ key ) ; } elseif ( is_string ( $ key ) ) { $ items = ( array ) $ this -> get ( $ key ) ; $ value = array_merge ( $ items , $ this -> getArrayItems ( $ value ) ) ; $ this -> set ( $ key , $ value ) ; } elseif ( $ key instanceof self ) { $ this -> elements = array_merge ( $ this -> elements , $ key -> all ( ) ) ; } }
Merge a given array or a Dot object with the given key
or with the whole Dot object

@param array|string|self $key
@param array             $value
Merge a given array or a Dot object with the given key or with the whole Dot object