1 | <?php |
||
14 | class JsonApiResponseFormatter extends Component implements ResponseFormatterInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var integer the encoding options passed to [[Json::encode()]]. For more details please refer to |
||
18 | * <http://www.php.net/manual/en/function.json-encode.php>. |
||
19 | * Default is `JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE`. |
||
20 | */ |
||
21 | public $encodeOptions = 320; |
||
22 | /** |
||
23 | * @var bool whether to format the output in a readable "pretty" format. This can be useful for debugging purpose. |
||
24 | * If this is true, `JSON_PRETTY_PRINT` will be added to [[encodeOptions]]. |
||
25 | * Defaults to `false`. |
||
26 | */ |
||
27 | public $prettyPrint = false; |
||
28 | |||
29 | /** |
||
30 | * Formats response data in JSON format. |
||
31 | * @link http://jsonapi.org/format/upcoming/#document-structure |
||
32 | * @param Response $response |
||
33 | */ |
||
34 | public function format($response) |
||
53 | } |
||
|
|||
54 |
This check marks files that end in a newline character, i.e. an empy line.