Example #1
0
 public function index()
 {
     try {
         $dataCategory = new Categories();
         $dataListcategories = $dataCategory->allcategories();
         $this->_responseWS->setDataResponse(Response::HTTP_OK, $dataListcategories->toArray(), array(), 'ok');
     } catch (Exception $exc) {
         $this->_responseWS->setDataResponse(Response::HTTP_INTERNAL_SERVER_ERROR, array(), array(), '');
     }
     $this->_responseWS->response();
 }