db = $db; $this->transformer = $transfomer; } public function count(): int { return $this->db->totalRecords($this->entity); } public function all(): Collection { return $this->get($this->count()); } public function get(int $max = 100): Collection { return $this->transformer->transform($this->db->fetchRecords($this->entity, $max), $this->entity); } }