code = (int)$response['code']; $obj->reason = $response['reason']; $obj->headers = $response['headers']; $obj->body = $response['body']; $obj->error = $response['error']; $obj->query = $query; return $obj; } public function getStatusCode() { return $this->code; } public function getStatusMessage() { if ( $this->code === 0 ) { return $this->error; } else { return $this->reason; } } public function getBody() { return $this->body; } /** * Get the TranslationQuery that was made for this request. * @return TranslationQuery * @since 2017.04 */ public function getQuery() { return $this->query; } }