Exemple #1
0
 /**
  * @param mixed $data The data which will be presented
  * @param string $rel The name of the relation inside of the _embedded field
  * @param string $route The name of the route, for generating the links
  * @param array $parameters The parameters to append to the route
  * @param int $page The number of the current page
  * @param int $limit The size of one page
  * @param int $total The total number of elements
  */
 public function __construct($data, $rel, $route, $parameters, $page, $limit, $total)
 {
     parent::__construct(new CollectionRepresentation($data, $rel), $route, $parameters, $page, $limit, $limit ? ceil($total / $limit) : 1);
     $this->total = $total;
     $this->data = $data;
     $this->rel = $rel;
 }
 public function __construct($inline, $route, array $parameters = array(), $page, $limit, $pages, $count, $pageParameterName = null, $limitParameterName = null, $absolute = false, $where, $search, $order, $whereParameterName = null, $searchParameterName = null, $orderParameterName = null)
 {
     parent::__construct($inline, $route, $parameters, $page, $limit, $pages, $pageParameterName, $limitParameterName, $absolute);
     $this->count = $count;
     $this->where = $where;
     $this->whereParameterName = $whereParameterName ?: 'where';
     $this->search = $search;
     $this->searchParameterName = $whereParameterName ?: 'search';
     $this->order = $order;
     $this->orderParameterName = $orderParameterName ?: 'order';
 }
 /**
  * {@inheritdoc}
  *
  * @param array $totals
  */
 public function __construct($inline, $route, array $parameters, $page, $limit, $pages, $pageParameterName, $limitParameterName, $absolute, $total, $totals, $time)
 {
     parent::__construct($inline, $route, $parameters, $page, $limit, $pages, $pageParameterName, $limitParameterName, $absolute, $total, $time);
     $this->totals = $totals;
     $this->time = $time;
 }