public function setPage(int $page) {
        if ($page < 0) {
            throw new \InvalidArgumentException("Invalid page '$page.'", 500);
        }

        $this->setOffset(($page - 1) * $this->getLimit());
        return $this;
    }
public function setPage(int $page) {
        if ($page < 0) {
            throw new \InvalidArgumentException("Invalid page '$page.'", 500);
        }

        $this->setOffset(($page - 1) * $this->getLimit());
        return $this;
    }
public function setPage ( int $ page ) { if ( $ page < 0 ) { throw new \ InvalidArgumentException ( "Invalid page '$page.'" , 500 ) ; } $ this -> setOffset ( ( $ page - 1 ) * $ this -> getLimit ( ) ) ; return $ this ; }
Set the current page.

@param int $page A valid page number.
@return $this
Set the current page .