/** @var obj_user
  * $obj_user = array() returns
  */
 public function getCategory($data)
 {
     $obj_user = array();
     $obj_chkapi = new App_Model_Chkapi();
     $validation_result = $obj_chkapi->chkAPI($data);
     $obj_create = new App_Model_Objcreation();
     if (!isset($data['PageNumber'])) {
         $data['PageNumber'] = 1;
     }
     if (!isset($data['RecordsPerPage'])) {
         $data['RecordsPerPage'] = 3;
     }
     if ($validation_result == 1) {
         try {
             $obj = new App_Model_Category();
             $query = $obj->getCategoryModule($data);
             $obj_pagination_block = new App_Model_PaginationBlock();
             $obj_user = $obj_pagination_block->getPaginationReturnModule($query, $data['RecordsPerPage'], $data['PageNumber'], 'category', '');
         } catch (exception $e) {
             $obj_user = $obj_create->createObjfalse(3);
         }
     } else {
         $obj_user = $obj_create->createObjfalse(2);
     }
     return $obj_user;
 }
 /** @var obj_user
  * $obj_user = array() returns
  */
 public function getSubCategory($id, $deal_id)
 {
     $obj_user = array();
     $obj_create = new App_Model_Objcreation();
     try {
         $obj = new App_Model_Subcategory();
         $query = $obj->getSubCategoryModule($id, $deal_id);
         $obj_pagination_block = new App_Model_PaginationBlock();
         $obj_user = $obj_pagination_block->getPaginationReturnModule($query, '100', 1, 'subcategory', '');
     } catch (exception $e) {
         $obj_user = $obj_create->createObjfalse(3);
     }
     return $obj_user;
 }
 /** @var obj_user
  * $obj_user = array()
  */
 public function getUserFavoritesBusinesses($data)
 {
     $obj_user = array();
     $obj_chkapi = new App_Model_Chkapi();
     $validation_result = $obj_chkapi->chkAPI($data);
     $obj_create = new App_Model_Objcreation();
     $flag = 'business';
     if ($validation_result == 1) {
         try {
             $obj = new App_Model_Business();
             $query = $obj->getUserFavoritesBusinessesModule($data);
             $obj_pagination_block = new App_Model_PaginationBlock();
             $obj_user = $obj_pagination_block->getPaginationReturnModule($query, $data['RecordsPerPage'], $data['PageNumber'], 'business', $flag);
         } catch (exception $e) {
             $obj_user = $obj_create->createObjfalse(3);
         }
     } else {
         $obj_user = $obj_create->createObjfalse(2);
     }
     return $obj_user;
 }