@param \Psr\Http\Message\ResponseInterface|null $rawResponse

@return self
975239
public function setRawResponse(\Psr\Http\Message\ResponseInterface $rawResponse): self {
        $this->rawResponse = $rawResponse;

        return $this;
    }
201381
private function createResponse(ResponseInterface $adapterResponse = null)
    {
        $response = new Response();

        if ($adapterResponse !== null) {
            $response->setCode($adapterResponse->getStatusCode());
            $response->setHeaders(new ParameterBag($adapterResponse->getHeaders()));
            $response->setBody((string) $adapterResponse->getBody());
        }

        return $response;
    }
1373469
public function setValue($rawValue)
    {
        if ($rawValue === null) {
            $this->value = null;
            return $this;
        }
        if (is_object($rawValue) && $rawValue instanceof $this->dataType) {
            $this->value = $rawValue;
            return $this;
        }
        $this->value = $this->propertyMapper->convert($rawValue, $this->dataType, $this->getPropertyMappingConfiguration());
        $this->validationResults = $this->propertyMapper->getMessages();
        if ($this->validator !== null) {
            $validationMessages = $this->validator->validate($this->value);
            $this->validationResults->merge($validationMessages);
        }

        return $this;
    }
385481
protected static function processForId(BunqResponseRaw $responseRaw): BunqResponse
    {
        $id = Id::fromJson($responseRaw, self::FIELD_ID)->getValue();

        return new BunqResponse($id->getId(), $responseRaw->getHeaders());
    }
799676
public function & SetPath ($rawPathValue) {
		/** @var $this \MvcCore\Request */
		$this->path = $rawPathValue;
		$this->requestUrl = NULL;
		$this->requestPath = NULL;
		$this->fullUrl = NULL;
		return $this;
	}
1342237
public function deleteByQuery($rawQuery) {
        $query = $this->client->createUpdate();
        $query->addDeleteQuery($rawQuery);
        return $this->createAndExecuteRequest($query);
    }
497869
public function setResponseContextClass(string $responseContextClass): RequestContext
    {
        if (!is_a($responseContextClass, ResponseContextAbstract::class, true)) {
            throw new RequestContextException(
                sprintf(
                    "Class %s must have %s as one of its parents",
                    $responseContextClass, //@codeCoverageIgnore
                    ResponseContextAbstract::class
                )
            );
        }

        $this->responseContextClass = $responseContextClass;

        return $this;
    }
237233
private function fromPsrResponse(ResponseInterface $response)
    {
        return new Response(
            $response->getStatusCode(),
            $response->getHeaders(),
            $response->getBody(),
            $response->getProtocolVersion(),
            $response->getReasonPhrase()
        );
    }
93165
public synchronized final void setResponse(RiakMessage rawResponse)
    {
        stateCheck(State.CREATED, State.WRITTEN, State.RETRY);
        U decodedMessage = decode(rawResponse);

        processMessage(decodedMessage);

        exception = null;
        if (done(decodedMessage))
        {
            logger.debug("Setting to Cleanup Wait State");
            remainingTries--;
            if (retrier != null)
            {
                retrier.operationComplete(this, remainingTries);
            }
            state = State.CLEANUP_WAIT;
        }
    }
806049
public function withSwooleResponse(SwooleResponse $swResponse): self
    {
        if ($this->swResponse === $swResponse) {
            return $this;
        }

        $clone = clone $this;
        $clone->swResponse = $swResponse;

        return $clone;
    }
123252
public function get($rawId)
    {
        $row = $this->getCart()->get($rawId);

        return is_null($row) ? null : new Item($row);
    }
569172
public function rawResponseToArray($responseRaw, $format)
    {
        if (strstr($responseRaw, 'winstrom')) {
            $nsbackup        = $this->nameSpace;
            $this->nameSpace = 'winstrom';
            $response        = parent::rawResponseToArray($responseRaw, $format);
            $this->nameSpace = $nsbackup;
        } else {
            $response = parent::rawResponseToArray($responseRaw, $format);
        }
        return $response;
    }
422549
protected function processRawResponse($rawResult) {
        $result = json_decode($rawResult, TRUE);

        if(json_last_error() !== JSON_ERROR_NONE) {
            throw new RuntimeException('Malformed JSON response! Message: ' . json_last_error_msg());
        }

        return $result;
    }
597016
protected function prepareResponse($responseRaw, RestRequest $request)
    {
        $body = (string) $responseRaw->getBody();
        
        $parsedResult = json_decode($body);
        if ($parsedResult == false) {
            $parsedResult = new \stdClass();
        }
        
        $response = new RestResponse($responseRaw->getStatusCode(), $body, $parsedResult, $request);
        
        return $response;
    }
571186
public function set(&$request, &$response = null)
    {
        $this->request  = $request;
        $this->response = $response;
        return $this;
    }
301231
public function setFromResponseObj(HttpResponse $response)
    {
        if ($response->isSuccess()) {
            $body = json_decode($response->getBody(), true);
            $this->setStatus((bool) isset($body['success']) ? $body['success'] : false);
        } else {
            $this->setError($response->getReasonPhrase());
        }

        return $this;
    }
490100
public function setResponse(array $data = null)
    {
        $this->DataArray    = $data;
        $this->ResponseData = json_encode($data);
        return $this;
    }