results = $results; $this->query = $query; $this->duration = (float) $duration; $this->offsetStart = (int) $offsetStart; $this->available = (int)$available; $this->total = (int)$total; $this->error = $error; $this->warning = $warning; $this->suggestions = $suggestions; $this->propositions = $propositions; $this->indexes = $indexes; return $this; } public function results() { return $this->results; } public function query() { return $this->query; } public function duration() { return $this->duration; } public function totalPages($amountPerPage) { return ceil($this->available / $amountPerPage); } public function currentPage($amountPerPage) { return ceil($this->offsetStart / $amountPerPage); } public function available() { return $this->available; } public function total() { return $this->total; } public function error() { return $this->error; } public function warning() { return $this->warning; } public function suggestions() { return $this->suggestions; } public function proposals() { return $this->propositions; } public function indexes() { return $this->indexes; } }