Ejemplo n.º 1
0
 public function __construct($message = '', puzzle_message_ResponseInterface $response = null, Exception $previous = null)
 {
     if (version_compare(PHP_VERSION, '5.3') >= 0) {
         parent::__construct($message, 0, $previous);
     } else {
         parent::__construct($message, 0);
     }
     $this->response = $response;
 }
Ejemplo n.º 2
0
 public function __construct($message = '', puzzle_message_RequestInterface $request, puzzle_message_ResponseInterface $response = null, Exception $previous = null)
 {
     $code = $response ? $response->getStatusCode() : 0;
     if (version_compare(PHP_VERSION, '5.3') < 0) {
         parent::__construct($message, $code);
     } else {
         parent::__construct($message, $code, $previous);
     }
     $this->request = $request;
     $this->response = $response;
 }