本文整理汇总了PHP中Pagination::paginate方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::paginate方法的具体用法?PHP Pagination::paginate怎么用?PHP Pagination::paginate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagination
的用法示例。
在下文中一共展示了Pagination::paginate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
/**
* Applies orderby(ies) and limits to the query and returns pagination data for the client
* @param Pagination $pagination [Pagination object, needed for clientside pagination]
* @param string $sql [SQL's string, passed by reference in order to modify it for sort and pagination]
* @return void
*/
public function process(Pagination $pagination, &$sql)
{
/** Applies changes to the SQL for sort purposes */
$this->sortQuery($sql);
/** @var array pagination data for the client */
$pagination_data = $pagination->paginate($sql);
/** Sets the pagination data on this object, to later be exposed to the client */
$this->setPaginationData($pagination_data);
}
示例2: userchecklistAction
public function userchecklistAction($I_pageNumber)
{
$O_checkMapper = new CheckMapper();
$O_pagination = new Pagination($O_checkMapper);
$A_limit = $O_pagination->paginate($I_pageNumber);
$I_nbPage = $A_limit['nbPage'];
$A_checks = $O_checkMapper->findByUserPerPage($A_limit);
Buffer::flushBuffer('check/userchecklist', array('checks' => $A_checks, 'nbPage' => $I_nbPage, 'pageNumber' => $I_pageNumber));
}
示例3: paginateAction
public function paginateAction($I_pageNumber)
{
// On vérifie si l'utilisateur connecté est bien un admin
$this->haveAccess();
$O_profileMapper = new ProfileMapper();
$O_pagination = new Pagination($O_profileMapper);
$A_limit = $O_pagination->paginate($I_pageNumber);
$I_nbPage = $A_limit['nbPage'];
$A_profiles = $O_profileMapper->findPerPage($A_limit);
Buffer::flushBuffer('profile/list', array('profile' => $A_profiles, 'nbPage' => $I_nbPage, 'pageNumber' => $I_pageNumber));
}
示例4: paginateAction
public function paginateAction($I_pageNumber)
{
// On vérifie si l'utilisateur connecté est bien un admin
$this->isAdmin();
$O_userMapper = new UserMapper();
$O_pagination = new Pagination($O_userMapper);
$A_limit = $O_pagination->paginate($I_pageNumber);
$I_nbPage = $A_limit['nbPage'];
$A_users = $O_userMapper->findPerPage($A_limit);
Buffer::flushBuffer('user/list', array('users' => $A_users, 'nbPage' => $I_nbPage, 'pageNumber' => $I_pageNumber));
}
示例5: ON
<?php
require_once 'init.php';
require_once LIB_PATH . 'functions.lib.php';
require_once LIB_PATH . 'paging.lib.php';
chkLicense();
chkSession();
$page_title = "Report";
$page_id = "12";
chkSecurity($page_id);
$ev_q = "SELECT e.id,\n\t\t\t\tCONCAT(u.fname,' ',u.lname) AS fullname,\n\t\t e.name AS evname,\n\t\t \t\te.ticker,\n\t\t\t\te.sdate,\n\t\t\t\te.edate,\n\t\t\t\te.createBy,\n\t\t\t\te.createDate,\n\t\t\t\te.qty_locket\n\t\t FROM events e\n\t\t INNER JOIN user u ON (u.id = e.createBy)\n\t WHERE e.createBy = '" . $_SESSION["uid"] . "' AND e.del = '0'\n\t\t ORDER BY e.sdate DESC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($ev_q);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF'] . "?" . $pagingResult->getPageQString();
include THEME_DEFAULT . 'header.php';
?>
<//-----------------CONTENT-START-------------------------------------------------//>
<h1 class="page-header"><?php
echo $page_title;
?>
Page</h1>
<div class="sub-header">
<div class="panel panel-default">
<div class="panel-heading">
</div>
<div class="panel-body">
<?php
echo $pagingResult->pagingMenu();
示例6:
?>
</a></td>
<td><?php
echo Functions::DateFormat('m/d/Y', $comment->date_created);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
echo $pagination->paginate();
?>
<?php
} else {
?>
<div class="block"><strong>No comments found</strong></div>
<?php
}
?>
</div>
<?php
include 'footer.php';
示例7: Pagination
<div class="panel-body">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<th>ID</th>
<th>Title</th>
<th>Author</th>
<th>Date Created</th>
<th>Action</th>
</thead>
<?php
$pages = new Pagination();
//Pagination Initialization
$data = $user->getTable('news', array('id', 'title', 'author', 'date'), 'date DESC', 100);
$numbers = $pages->paginate($data, 6);
$result = $pages->fetchResult();
foreach ($result as $news) {
//Output Last 10 Registered Users
?>
<tbody>
<tr>
<td><?php
echo escape($news->id);
?>
</td>
<td><?php
echo escape($news->title);
?>
</td>