src/Paginator/Paginator.php
public function setItemCountPerPage($itemCountPerPage = -1)
    {
        $this->itemCountPerPage = (int) $itemCountPerPage;
        if ($this->itemCountPerPage < 1) {
            $this->itemCountPerPage = $this->getTotalItemCount();
        }
        $this->pageCount        = $this->_calculatePageCount();
        $this->currentItems     = null;
        $this->currentItemCount = null;

        return $this;
    }
public function setItemCountPerPage($itemCountPerPage = -1)
    {
        $this->itemCountPerPage = (int) $itemCountPerPage;
        if ($this->itemCountPerPage < 1) {
            $this->itemCountPerPage = $this->getTotalItemCount();
        }
        $this->pageCount        = $this->_calculatePageCount();
        $this->currentItems     = null;
        $this->currentItemCount = null;

        return $this;
    }
public function setItemCountPerPage ( $ itemCountPerPage = - 1 ) { $ this -> itemCountPerPage = ( int ) $ itemCountPerPage ; if ( $ this -> itemCountPerPage < 1 ) { $ this -> itemCountPerPage = $ this -> getTotalItemCount ( ) ; } $ this -> pageCount = $ this -> _calculatePageCount ( ) ; $ this -> currentItems = null ; $ this -> currentItemCount = null ; return $ this ; }
Sets the number of items per page.

@param  int $itemCountPerPage
@return Paginator $this
Sets the number of items per page .