예제 #1
0
 public function proceed(HermitProxy $proxy, $name, array $parameters)
 {
     if ($this->hasTransaction()) {
         throw new LogicException('Already associated with another transaction');
     }
     return $proxy->request($name, $parameters);
 }
예제 #2
0
 public function proceed(HermitProxy $proxy, $name, array $parameters)
 {
     if (!$this->hasTransaction()) {
         throw new LogicException('No transaction');
     }
     return $proxy->request($name, $parameters);
 }
예제 #3
0
 public function proceed(HermitProxy $proxy, $name, array $parameters)
 {
     try {
         return $proxy->request($name, $parameters);
     } catch (Exception $e) {
         throw $e;
     }
 }
예제 #4
0
 public function execute(HermitProxy $proxy, $name, array $parameters)
 {
     $response = $proxy->request($name, $parameters);
     $responders = $this->responders[$name];
     foreach ($responders as $responder) {
         $responder->request($name, array($response));
     }
     return $response;
 }
예제 #5
0
 public function proceed(HermitProxy $proxy, $name, array $parameters)
 {
     $this->begin();
     try {
         $ret = $proxy->request($name, $parameters);
         $this->commit();
         return $ret;
     } catch (Exception $e) {
         $this->complete($e);
         throw $e;
     }
 }
예제 #6
0
 public function proceed(HermitProxy $proxy, $name, array $parameters)
 {
     $began = false;
     if (!$this->hasTransaction()) {
         $this->begin();
         $began = true;
     }
     $ret = null;
     try {
         $ret = $proxy->request($name, $parameters);
         if ($began) {
             $this->commit();
         }
         return $ret;
     } catch (Exception $e) {
         if ($began) {
             $this->complete($e);
         }
         throw $e;
     }
 }
예제 #7
0
파일: Hermit.php 프로젝트: nowelium/Hermit
 protected static function __request(HermitProxy $proxy, $name, array $params)
 {
     return $proxy->request($name, $params);
 }