/**
  * Set up class dependencies
  *
  * @param Array $collectable
  * @param Integer $total
  * @param Integer $totalPages
  * @param Integer $pageNo
  * @param Integer $pageSize
  * @author Dan Cox
  */
 public function __construct(array $collectable = array(), $total = 0, $totalPages = 0, $pageNo = 0, $pageSize = 0)
 {
     parent::__construct($collectable);
     $this->total = $total;
     $this->totalPages = $totalPages;
     $this->pageNo = $pageNo;
     $this->pageSize = $pageSize;
 }
예제 #2
0
 /**
  * Transfers records to a paginated entity collection
  *
  * @param \Wasp\Entity\EntityCollection $results
  * @return PaginatedEntityCollection
  * @author Dan Cox
  */
 public function makeCollection($results)
 {
     $collection = new PaginatedEntityCollection($results->all(), $this->total, $this->totalPages, $this->pageNo, $this->pageSize);
     $collection->setDI($this->container);
     return $collection;
 }