本文整理汇总了PHP中Zend_Paginator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Paginator::__construct方法的具体用法?PHP Zend_Paginator::__construct怎么用?PHP Zend_Paginator::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Paginator
的用法示例。
在下文中一共展示了Zend_Paginator::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Konstruktor
*
* @param Zend_Db_Select $select
* @param Zend_Controller_Request_Abstract $request
* @param Zend_Translate $translator
*/
public function __construct(Zend_Db_Select $select, Zend_Controller_Request_Abstract $request, Zend_Translate $translator = null)
{
$paginatorAdapter = new Zend_Paginator_Adapter_DbSelect($select);
$this->select = $select;
$this->translator = $translator;
$this->url = new Ble422_Urls($request);
parent::__construct($paginatorAdapter);
}
示例2: __construct
/**
* Constructor.
*
* @param Zend_Paginator_Adapter_Interface|Zend_Paginator_AdapterAggregate $adapter
*/
public function __construct($adapter, $request = null, $pageFieldName = null)
{
parent::__construct($adapter);
if (!is_null($request)) {
$this->request = $request;
}
if (!is_null($pageFieldName)) {
$this->pageFieldName = $pageFieldName;
}
}
示例3: __construct
/**
* Constructor.
*
* @param Zend_Paginator_Adapter_Interface|Zend_Paginator_AdapterAggregate $adapter
*/
public function __construct($adapter, $request = null, $pageFieldName = null, $defaultPageSize = null)
{
parent::__construct($adapter);
if (!is_null($pageFieldName)) {
$this->pageFieldName = $pageFieldName;
}
if (!is_null($defaultPageSize)) {
$this->defaultPageSize = $defaultPageSize;
}
if (!is_null($request)) {
$this->request = $request;
$this->setCurrentPageNumber($request->getParam($this->pageFieldName));
$this->setItemCountPerPage($request->getParam('pageSize', $this->defaultPageSize));
}
}
示例4: __construct
public function __construct($adapter, $moreActions = array())
{
parent::__construct($adapter);
$this->moreActions = $moreActions;
}
示例5:
/**
* Constructor
*
* @param Doctrine_Query $query Query to paginate
*/
function __construct(Doctrine_Query $query)
{
$this->adapter = new ZendX_Doctrine_Paginator_Adapter_Doctrine($query);
parent::__construct($this->adapter);
}
示例6: __construct
public function __construct($adapter)
{
parent::__construct($adapter);
$this->setCacheEnabled(false);
}
示例7: __construct
/**
* Get new doctrine query paginator
*
* @param Doctrine_Query $query
* @param int $limit
* @param int $page
*/
public function __construct(Doctrine_Query $query, $page = 1, $limit = 10)
{
parent::__construct(new App_Paginator_Adapter_DoctrineQuery($query));
$this->setItemCountPerPage($limit);
$this->setCurrentPageNumber($page);
}