Example #1
0
 /**
  * @return UseCaseResponse
  */
 public function execute(UseCaseRequest $useCaseRequest)
 {
     $this->useCaseRequest = $useCaseRequest;
     $this->buildStrategies();
     try {
         list($response, $stopExecution) = $this->preExecute();
         if ($stopExecution) {
             $this->useCaseResponse = $response;
         } else {
             $this->useCaseResponse = $this->useCase->execute($useCaseRequest);
         }
         $this->postExecute();
         return $this->useCaseResponse;
     } catch (\Exception $e) {
         $this->onException($e);
         throw $e;
     }
 }
 /**
  * @Transaction()
  * @return UseCaseResponse
  */
 public function execute(UseCaseRequest $useCaseRequest)
 {
     return $this->nestedUseCase->execute($useCaseRequest);
 }