src/ArrayObject.php
public function unshift(...$values)
    {
        $this->forceCollection();
        $values = array_map([$this, 'unbox'], $values);
        array_unshift($this->data, ...$values);

        return $this;
    }
public function unshift(...$values)
    {
        $this->forceCollection();
        $values = array_map([$this, 'unbox'], $values);
        array_unshift($this->data, ...$values);

        return $this;
    }
public function unshift ( ... $ values ) { $ this -> forceCollection ( ) ; $ values = array_map ( [ $ this , 'unbox' ] , $ values ) ; array_unshift ( $ this -> data , ... $ values ) ; return $ this ; }
Add one or more items at the start of the collection.
If the underlying data is not a collection, it will be converted to one.

@param array $values

@throws \Rexlabs\ArrayObject\Exceptions\InvalidOffsetException

@return mixed
Add one or more items at the start of the collection . If the underlying data is not a collection it will be converted to one .