src/Koldy/Pagination.php
protected function detectOtherValues()
    {
        $this->totalPages = ceil($this->maxItems / $this->itemsPerPage);

        $this->half = floor($this->numberOfPageLinks / 2);
        $this->startPage = $this->currentPage - $this->half;

        if ($this->startPage < 1) {
            $this->startPage = 1;
        }

        $this->endPage = $this->startPage + $this->numberOfPageLinks - 1;

        if ($this->endPage > $this->totalPages) {
            $this->endPage = $this->totalPages;
        }
    }
protected function detectOtherValues()
    {
        $this->totalPages = ceil($this->maxItems / $this->itemsPerPage);

        $this->half = floor($this->numberOfPageLinks / 2);
        $this->startPage = $this->currentPage - $this->half;

        if ($this->startPage < 1) {
            $this->startPage = 1;
        }

        $this->endPage = $this->startPage + $this->numberOfPageLinks - 1;

        if ($this->endPage > $this->totalPages) {
            $this->endPage = $this->totalPages;
        }
    }
protected function detectOtherValues ( ) { $ this -> totalPages = ceil ( $ this -> maxItems / $ this -> itemsPerPage ) ; $ this -> half = floor ( $ this -> numberOfPageLinks / 2 ) ; $ this -> startPage = $ this -> currentPage - $ this -> half ; if ( $ this -> startPage < 1 ) { $ this -> startPage = 1 ; } $ this -> endPage = $ this -> startPage + $ this -> numberOfPageLinks - 1 ; if ( $ this -> endPage > $ this -> totalPages ) { $ this -> endPage = $ this -> totalPages ; } }
Detect other values needed for generate methods
Detect other values needed for generate methods