public function offsetAppend($index, $value)
    {
        $items = [];
        if ($this->offsetExists($index)) {
            $items = $this->offsetGet($index);
            if (!is_array($items)) {
                $itemsType = gettype($items);
                throw new \Exception("Offset '$index' is '$itemsType' and must be array to append.");
            }
        }
        $items[] = $value;
        $this->offsetSet($index, $items);
    }
public function offsetAppend($index, $value)
    {
        $items = [];
        if ($this->offsetExists($index)) {
            $items = $this->offsetGet($index);
            if (!is_array($items)) {
                $itemsType = gettype($items);
                throw new \Exception("Offset '$index' is '$itemsType' and must be array to append.");
            }
        }
        $items[] = $value;
        $this->offsetSet($index, $items);
    }
public function offsetAppend ( $ index , $ value ) { $ items = [ ] ; if ( $ this -> offsetExists ( $ index ) ) { $ items = $ this -> offsetGet ( $ index ) ; if ( ! is_array ( $ items ) ) { $ itemsType = gettype ( $ items ) ; throw new \ Exception ( "Offset '$index' is '$itemsType' and must be array to append." ) ; } } $ items [ ] = $ value ; $ this -> offsetSet ( $ index , $ items ) ; }
adds a value to an offset array, if there is an array
@param  mixed $index
@param  mixed $value
@return bool
adds a value to an offset array if there is an array