public function append($arr) : void
    {
        if($arr instanceof Collection) {
            $arr = $arr->getAll();
        }

        if(!is_array($arr)) {
            return;
        }

        foreach($arr as $key => $value) {
            $this->_data[$key] = $value;
        }
    }
public function append($arr) : void
    {
        if($arr instanceof Collection) {
            $arr = $arr->getAll();
        }

        if(!is_array($arr)) {
            return;
        }

        foreach($arr as $key => $value) {
            $this->_data[$key] = $value;
        }
    }
public function append ( $ arr ) : void { if ( $ arr instanceof Collection ) { $ arr = $ arr -> getAll ( ) ; } if ( ! is_array ( $ arr ) ) { return ; } foreach ( $ arr as $ key => $ value ) { $ this -> _data [ $ key ] = $ value ; } }
Appends the contents of an array to this array.

The indexes with same key will be overwritten.

@param array|Collection $arr Array to append.
Appends the contents of an array to this array .