diff --git a/Westdc/User/Group.php b/Westdc/User/Group.php new file mode 100644 index 0000000..3566d8c --- /dev/null +++ b/Westdc/User/Group.php @@ -0,0 +1,47 @@ +serviceManager = $serviceManager; + + $this->init(); + + return $this; + } + + private function init() + { + $dbService = $this->serviceManager->get('Db'); + $this->db = $dbService->getPdo(); + } + + + /** + * @return mixed + */ + public function fetchAll () { + + $sql = "SELECT * FROM groups"; + $rs = $this->db->query($sql); + + return $rs->fetchAll(\PDO::FETCH_ASSOC); + } + +} \ No newline at end of file