serviceManager = $serviceManager; $this->init(); return $this; } private function init() { $dbService = $this->serviceManager->get('Db'); $this->db = $dbService->getPdo(); } public function fetchAll(){ $sql = "select * from users where usertype = 'member'"; $rs = $this->db->query($sql); return $rs->fetchAll(\PDO::FETCH_ASSOC); } }