Example #1
0
 /**
  * @return SS_HTTPResponse
  */
 public function getJob()
 {
     $job_id = (int) $this->request->param('JOB_ID');
     try {
         $job = $this->repository->getById($job_id);
         if (!$job) {
             throw new NotFoundEntityException('Job', sprintf('id %s', $job_id));
         }
         return $this->ok(JobsAssembler::convertJobToArray($job));
     } catch (NotFoundEntityException $ex1) {
         SS_Log::log($ex1, SS_Log::ERR);
         return $this->notFound($ex1->getMessage());
     } catch (Exception $ex) {
         SS_Log::log($ex, SS_Log::ERR);
         return $this->serverError();
     }
 }
 /**
  * @return SS_HTTPResponse
  */
 public function getJobRegistrationRequest()
 {
     $request_id = (int) $this->request->param('REQUEST_ID');
     try {
         $request = $this->repository->getById($request_id);
         if (!$request) {
             throw new NotFoundEntityException('JobRegistrationRequest', sprintf('id %s', $request_id));
         }
         return $this->ok(JobsAssembler::convertJobRegistrationRequestToArray($request));
     } catch (NotFoundEntityException $ex1) {
         SS_Log::log($ex1, SS_Log::ERR);
         return $this->notFound($ex1->getMessage());
     } catch (Exception $ex) {
         SS_Log::log($ex, SS_Log::ERR);
         return $this->serverError();
     }
 }