public function __construct($attributes = array(), $connection = null) { parent::__construct($attributes, $connection); $this->connection = $connection; $this->attributes = array_merge($this->attributes, $attributes); $this->attributes['type'] = 'card'; }
public function __construct($attributes = array(), $connection = null) { parent::__construct($attributes, $connection); $this->page = $attributes['page']; # 1-based $this->pageSize = $attributes['page_size']; $this->pageEntries = sizeof($attributes['results']); $this->totalEntries = $attributes['total_entries']; $this->totalPages = $this->pageSize == 0 ? 0 : ceil($this->totalEntries / $this->pageSize); }