/** * can handle queries of: * - x and y */ public function getListAction() { $x = $this->params()->fromRoute('x'); $y = $this->params()->fromRoute('y'); $this->logger()->info("whathood REST get xy={$x},{$y}"); $point = new Point($x, $y); $userPolygons = $this->m()->userPolygonMapper()->byPoint($point); if (empty($userPolygons)) { $userPolygons = array(); } $electionPoint = PointElection::Build(array('point' => $point, 'user_polygons' => $userPolygons, 'logger' => $this->logger())); return new JsonModel($electionPoint->toArray()); }