public function __construct(ItemList $itemList)
 {
     $itemList->getQueryObject()->setMaxResults($this->maxResultsToProcessAtOnce);
     $results = $itemList->getResults();
     $adapter = new ArrayAdapter($results);
     $this->list = $itemList;
     return Pagerfanta::__construct($adapter);
 }
예제 #2
0
 public function __construct(AbstractItemList $itemList, AdapterInterface $adapter)
 {
     $this->list = $itemList;
     return parent::__construct($adapter);
 }
예제 #3
0
 /**
  * Constructor
  *
  * @param mixed   $items
  * @param integer $page
  * @param integer $limit
  */
 public function __construct($items, $limit = 25, $page = 1)
 {
     parent::__construct($this->createAdapterFromInstance($items));
     $this->setMaxPerPage($limit);
     $this->setCurrentPage($page);
 }
예제 #4
0
파일: Pager.php 프로젝트: bolt/Members
 /**
  * {@inheritdoc}
  */
 public function __construct(AdapterInterface $adapter, Builder $builder)
 {
     parent::__construct($adapter);
     $this->builder = $builder;
 }