. ?
1) - Zend_Paginator -. ( - ..), itemCountPerPage, currentPageNumbe, ( ),
$comments = $this->getCommentsMapper()->getPage($itemCountPerPage, $currentPage);
( , ),
$totalComments = $this->getCommentsMapper()->getTotal();
, , " ". "Zendy", .
2) Zend_Paginator, LIE . , , , , "total count" . .
3) , "", . , . :
`
$ commentsService = $this- > getCommentsService();
$ CommentsService- > setItemCountPerPage (10);// , 10 config.ini
$commentsPage = $this- > getCommentsService() → getPage (12);
$ this- > view- > commentsPage = $commentsPage;
`
-
`
$ CommentsPage- > GetItems();//
$commentsPage- > getCurrentPageNumber();
$commentsPage- > getTotalItemsCount();
`
.
.
Now I am choosing between the first and third approaches, perhaps I will go with the third.
source
share