dbh = $database->conn; $this->teamMapper = new TeamMapper($this->dbh); } /** * Fetch entire team table */ public function getAll(): array { return $this->teamMapper->getAll(); } /** * Find team with supplied id */ public function get(int $id): ?Team { return $this->teamMapper->get($id); } /** * Inserts team into database */ public function create(Team $team): Team { return $this->teamMapper->create($team); } public function delete(int $id): void { $this->teamMapper->delete($id); } public function update(Team $team): Team { return $this->teamMapper->update($team); } }