public function __construct($success = true, $code = 0, $message = '', $location = null, $set = null, $date = '') { parent::__construct($success, $code, $message); $this->set = $set; $this->location = $location; $this->date = $date; }
public function __construct($statusCode, $headers = [], $body = '') { parent::__construct($statusCode, $headers, $body); // make sure body is not only whitespace if (trim($body)) { $this->decodeBody($body); } }
public function __construct($statusCode, $headers = [], $body = '') { parent::__construct($statusCode, $headers, $body); // make sure body isn't only whitespace & has a value for the counter if (trim($body) && strpos($body, 'value')) { // json response $body = json_decode(rawurldecode($this->body)); $this->set = new Set($body->value, $body->context, $this->headers); } }
public function __construct($statusCode, $headers = [], $body = '', $decodeAsAssociative = false) { parent::__construct($statusCode, $headers, $body); $this->decodeAsAssociative = $decodeAsAssociative; // make sure body is not only whitespace if (trim($body) && !$this->hasSiblings()) { $this->parseObject(); } elseif (trim($body) && $this->hasSiblings()) { $this->parseSiblings(); } }
public function __construct($statusCode, $headers = [], $body = '', Bucket $bucket = null) { parent::__construct($statusCode, $headers, $body); // make sure body is not only whitespace if (trim($body)) { $properties = json_decode($this->body, true); if ($bucket) { $this->bucket = new Bucket($bucket->getName(), $bucket->getType(), $properties['props']); } } }
public function __construct($statusCode, $headers = [], $body = '') { parent::__construct($statusCode, $headers, $body); // make sure body is not only whitespace $this->results = in_array($this->statusCode, [200, 204]) ? json_decode($body) : null; if ($this->results) { foreach ($this->results->response->docs as $doc) { $this->docs[] = new Doc($doc); } } }
public function __construct($success = true, $code = 0, $message = '', $results = [], $termsReturned = false, $continuation = null, $done = true, $date = '') { parent::__construct($success, $code, $message); $this->results = $results; $this->termsReturned = $termsReturned; $this->continuation = $continuation; $this->done = $done; $this->date = $date; // when timeout is used, cURL returns success for some reason if (in_array($code, ['501', '503'])) { $this->success = false; } }
public function __construct($success = true, $code = 0, $message = '', $index = null) { parent::__construct($success, $code, $message); $this->index = $index; }
public function __construct($success = true, $code = 0, $message = '', $rows = []) { parent::__construct($success, $code, $message); $this->rows = $rows; }
public function __construct($success = true, $code = 0, $message = '', $location = null, $objects = []) { parent::__construct($success, $code, $message); $this->objects = $objects; $this->location = $location; }
public function __construct($success = true, $code = 0, $message = '', $data = []) { parent::__construct($success, $code, $message); $this->stats = $data; }
public function __construct($success = true, $code = 0, $message = '', $schema = null, $contentType = '') { parent::__construct($success, $code, $message); $this->schema = $schema; $this->contentType = $contentType; }
public function __construct($success = true, $code = 0, $message = '', $results = null) { parent::__construct($success, $code, $message); $this->results = $results; }
public function __construct($success = true, $code = 0, $message = '', Bucket $bucket = null, $modified = '') { parent::__construct($success, $code, $message); $this->bucket = $bucket; $this->modified = $modified; }
/** * Response constructor. * @param bool|true $success * @param int $code * @param string $message * @param int $numFound * @param \Basho\Riak\Search\Doc[] $docs */ public function __construct($success = true, $code = 0, $message = '', $numFound = 0, $docs = []) { parent::__construct($success, $code, $message); $this->numFound = $numFound; $this->docs = $docs; }