You are here

public function JsonResponse::setEncodingOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/JsonResponse.php \Symfony\Component\HttpFoundation\JsonResponse::setEncodingOptions()

Sets options used while encoding data to JSON.

Parameters

int $encodingOptions:

Return value

JsonResponse

File

vendor/symfony/http-foundation/JsonResponse.php, line 170

Class

JsonResponse
Response represents an HTTP response in JSON format.

Namespace

Symfony\Component\HttpFoundation

Code

public function setEncodingOptions($encodingOptions) {
  $this->encodingOptions = (int) $encodingOptions;
  return $this
    ->setData(json_decode($this->data));
}