serviceManager = $serviceManager; $this->init(); return $this; } private function init() { $dbService = $this->serviceManager->get('Db'); $this->db = $dbService->getPdo(); } public function getUserCount(){ $sql="select count(id) as total from users"; $uq=$this->db->query($sql); return $uq->fetchColumn(0); } public function getAdminCount(){ $sql="select count(id) as total from users where usertype='administrator'"; $uq=$this->db->query($sql); return $uq->fetchColumn(0); } }