예제 #1
0
 public function __construct($uri, $code, $accessKey = NULL, $accessSecret = NULL)
 {
     parent::__construct(NULL, $code);
     $this->uri = $uri;
     $this->accessKey = $accessKey;
     $this->accessSecret = $accessSecret;
 }
예제 #2
0
 public function __construct($response, $data)
 {
     $this->response = $response;
     $message = sprintf("Response code %d from %s", $this->response['http_code'], $this->response['url']);
     if (strpos($this->response['content_type'], "json")) {
         $this->data = json_decode($data);
         $message .= " - " . $this->data->error;
     }
     parent::__construct($message, $this->response['http_code']);
 }