Menu

## JsonResponseFormatter
in package
implements ResponseFormatterInterface

JsonResponseFormatter.php : 8

### Interfaces, Classes and Traits

ResponseFormatterInterface

### Table of Contents

CONTENT_TYPE_JSON = 'application/json; charset=UTF-8'
CONTENT_TYPE_JSONP = 'application/javascript; charset=UTF-8'
$contentType : string|null
$encodeOptions : int
$prettyPrint : bool
$useJsonP : bool
__construct() : mixed
format() : mixed
formatJsonP() : mixed
formatJson() : mixed

### Constants

#### CONTENT_TYPE_JSON

JsonResponseFormatter.php : 11
`public mixed CONTENT_TYPE_JSON = 'application/json; charset=UTF-8'`

#### CONTENT_TYPE_JSONP

JsonResponseFormatter.php : 13
`public mixed CONTENT_TYPE_JSONP = 'application/javascript; charset=UTF-8'`

### Properties

#### $contentType

JsonResponseFormatter.php : 15
`public string|null $contentType`

#### $encodeOptions

JsonResponseFormatter.php : 19
`public int $encodeOptions = 320`

#### $prettyPrint

JsonResponseFormatter.php : 21
`public bool $prettyPrint = false`

#### $useJsonP

JsonResponseFormatter.php : 17
`public bool $useJsonP = false`

### Methods

#### __construct()

JsonResponseFormatter.php : 23
`public __construct([array<string|int, mixed> $options = [] ]) : mixed`

##### Parameters

$options : array<string|int, mixed> = []

##### Return values

mixed —

#### format()

JsonResponseFormatter.php : 28
`public format(Response $response) : mixed`

##### Parameters

$response : Response

##### Return values

mixed —

#### formatJsonP()

JsonResponseFormatter.php : 62
`public formatJsonP(Response $response) : mixed`

##### Parameters

$response : Response

##### Return values

mixed —

#### formatJson()

JsonResponseFormatter.php : 48
`private formatJson(Response $response) : mixed`

##### Parameters

$response : Response

##### Return values

mixed —

## Search results