FeedWriter\Feed::setPagination PHP Method

setPagination() public method

See RFC 5005, chapter 3. At least one page URL must be specified.
public setPagination ( string $nextURL = null, string $previousURL = null, string $firstURL = null, string $lastURL = null ) : self
$nextURL string The URL to the next page of this feed. Optional.
$previousURL string The URL to the previous page of this feed. Optional.
$firstURL string The URL to the first page of this feed. Optional.
$lastURL string The URL to the last page of this feed. Optional.
return self
    public function setPagination($nextURL = null, $previousURL = null, $firstURL = null, $lastURL = null)
    {
        if (empty($nextURL) && empty($previousURL) && empty($firstURL) && empty($lastURL)) {
            throw new \LogicException('At least one URL must be specified for pagination to work.');
        }
        if (!empty($nextURL)) {
            $this->setAtomLink($nextURL, 'next');
        }
        if (!empty($previousURL)) {
            $this->setAtomLink($previousURL, 'previous');
        }
        if (!empty($firstURL)) {
            $this->setAtomLink($firstURL, 'first');
        }
        if (!empty($lastURL)) {
            $this->setAtomLink($lastURL, 'last');
        }
        return $this;
    }