public static function nextRange(ObjectList $list): self
    {
        $range = new self();
        $start = $list->getStartIndex() + $list->getEntryCount();
        $range->setStartIndex($start)
            ->setEndIndex($start - 1 + $list->getItemsPerPage());

        return $range;
    }
public static function nextRange(ObjectList $list): self
    {
        $range = new self();
        $start = $list->getStartIndex() + $list->getEntryCount();
        $range->setStartIndex($start)
            ->setEndIndex($start - 1 + $list->getItemsPerPage());

        return $range;
    }
public static function nextRange ( ObjectList $ list ) : self { $ range = new self ( ) ; $ start = $ list -> getStartIndex ( ) + $ list -> getEntryCount ( ) ; $ range -> setStartIndex ( $ start ) -> setEndIndex ( $ start - 1 + $ list -> getItemsPerPage ( ) ) ; return $ range ; }
Given an object list, return the range to load the next page of objects.

@param ObjectList $list The list to find the next page for.

@return Range A new range.
Given an object list return the range to load the next page of objects .