src/Charcoal/Model/Collection.php
protected function resolveOffset($offset)
    {
        if (is_int($offset)) {
            if ($offset < 0) {
                $offset = ($this->count() - abs($offset));
            }
        }

        return $offset;
    }
protected function resolveOffset($offset)
    {
        if (is_int($offset)) {
            if ($offset < 0) {
                $offset = ($this->count() - abs($offset));
            }
        }

        return $offset;
    }
protected function resolveOffset ( $ offset ) { if ( is_int ( $ offset ) ) { if ( $ offset < 0 ) { $ offset = ( $ this -> count ( ) - abs ( $ offset ) ) ; } } return $ offset ; }
Parse the array offset.

If offset is non-negative, the sequence will start at that offset in the collection.
If offset is negative, the sequence will start that far from the end of the collection.

@param  integer $offset The array offset.
@return integer Returns the resolved array offset.
Parse the array offset .