serviceManager = $serviceManager; $this->init(); return $this; } private function init() { $dbService = $this->serviceManager->get('Db'); $this->db = $dbService->getPdo(); } public function fetchAll() { $sql='SELECT * FROM emailtext'; $rs=$this->db->query($sql); return $rs->fetchAll(\PDO::FETCH_ASSOC); } }