/** * Get all Comercio entities. * * @View(serializerEnableMaxDepthChecks=true) * * @param ParamFetcherInterface $paramFetcher * * @return Response * * @QueryParam(name="q", nullable=true, description="Search text.") * @QueryParam(name="offset", requirements="\d+", nullable=true, description="Offset from which to start listing notes.") * @QueryParam(name="limit", requirements="\d+", default="20", description="How many notes to return.") * @QueryParam(name="order_by", nullable=true, array=true, description="Order by fields. Must be an array ie. &order_by[name]=ASC&order_by[description]=DESC") * @QueryParam(name="filters", nullable=true, array=true, description="Filter by fields. Must be an array ie. &filters[id]=3") * @Get("/filters/operators") */ public function operatorsAction(ParamFetcherInterface $paramFetcher) { try { $operators = Utility::operators(); if ($operators) { return array($operators); } return FOSView::create('Not Found', Codes::HTTP_NO_CONTENT); } catch (\Exception $e) { return FOSView::create($e->getMessage(), Codes::HTTP_INTERNAL_SERVER_ERROR); } }