Exemple #1
0
 function searchResourceModel($searchCriteriaForm)
 {
     $formObjRaw = new FormDTO(SEARCH_USER_FORM, $searchCriteriaForm);
     $responseDTO = new ResponseDTO(SEARCH_USER_FORM);
     try {
         $formDataObj = $formObjRaw->getFormData();
         $userDAO = new UserDAO();
         $userDTOList = $userDAO->getUserInfoByCriteria($formDataObj);
         return $userDTOList;
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         throw $authExp;
     } catch (Exception $e) {
         throw $e;
     }
 }
Exemple #2
0
 function searchResourceModel($searchCriteriaForm)
 {
     $formObjRaw = new FormDTO(SEARCH_USER_FORM, $searchCriteriaForm);
     $responseDTO = new ResponseDTO(SEARCH_USER_FORM);
     try {
         $formDataObj = $formObjRaw->getFormData();
         $validator = new FormValidator(SEARCH_USER_FORM, $formDataObj);
         $validationError = $validator->checkAll();
         if (sizeof($validationError) == 0) {
             $userDAO = new UserDAO();
             $userDTOList = $userDAO->getUserInfoByCriteria($formDataObj);
             return $userDTOList;
         } else {
             if (array_key_exists(NAME, $validationError)) {
                 $responseDTO->setErrField(NAME, $validationError[NAME]);
             }
             return $responseDTO;
         }
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         throw $authExp;
     } catch (Exception $e) {
         throw $e;
     }
 }