setTotalPages example


  public function __construct($totalItems$limit$currentPage = 0) {
    $this->totalItems = $totalItems;
    $this->limit = $limit;
    $this->setTotalPages($totalItems$limit);
    $this->setCurrentPage($currentPage);
  }

  /** * Sets the current page to a valid value within range. * * If a page that does not correspond to the actual range of the result set * was provided, this function will set the closest page actually within * the result set. * * @param int $currentPage * (optional) The current page. */
Home | Imprint | This part of the site doesn't use cookies.