public function restAfterIndex($index)
    {
        $index = $this->getIntegerable($index);

        if ( ! is_numeric($index))
        {
            throw new BadMethodCallException('Argument 1: ' . $index . ' is not numeric');
        }

        $length = $this->length();

        if ($length <= $index)
        {
            throw new OffsetNotExistsException('Offset: '. $index .' not exists');
        }

        $index++;

        $keys = $this->keys()->cut($index, $length - 1)->flip();

        $values = $this->values()->cut($index, $length - 1)->all();

        return $keys->combine($values, 'values');
    }
public function restAfterIndex($index)
    {
        $index = $this->getIntegerable($index);

        if ( ! is_numeric($index))
        {
            throw new BadMethodCallException('Argument 1: ' . $index . ' is not numeric');
        }

        $length = $this->length();

        if ($length <= $index)
        {
            throw new OffsetNotExistsException('Offset: '. $index .' not exists');
        }

        $index++;

        $keys = $this->keys()->cut($index, $length - 1)->flip();

        $values = $this->values()->cut($index, $length - 1)->all();

        return $keys->combine($values, 'values');
    }
public function restAfterIndex ( $ index ) { $ index = $ this -> getIntegerable ( $ index ) ; if ( ! is_numeric ( $ index ) ) { throw new BadMethodCallException ( 'Argument 1: ' . $ index . ' is not numeric' ) ; } $ length = $ this -> length ( ) ; if ( $ length <= $ index ) { throw new OffsetNotExistsException ( 'Offset: ' . $ index . ' not exists' ) ; } $ index ++ ; $ keys = $ this -> keys ( ) -> cut ( $ index , $ length - 1 ) -> flip ( ) ; $ values = $ this -> values ( ) -> cut ( $ index , $ length - 1 ) -> all ( ) ; return $ keys -> combine ( $ values , 'values' ) ; }
Return rest items after given index.

@param int|IntegerContract $index
@return \im\Primitive\Container\Container
@throws \im\Primitive\Container\Exceptions\BadLengthException
@throws \im\Primitive\Container\Exceptions\ContainerException
@throws \im\Primitive\Support\Exceptions\OffsetNotExistsException
Return rest items after given index .