/**
* Returns a URL to the "next" page.
*
* You MUST call hasNextPage() first, or this value may be invalid.
*
* @return string|null
*/
public function getNextPage() { if (!
$this->
hasNextPage()) { return null;
} $uri =
clone $this->uri;
if ($this->segment === 0
) { $uri->
addQuery($this->pageSelector,
$this->current + 1
);
} else { $uri->
setSegment($this->segment,
$this->current + 1
);
}