| 1 | <?php |
||
| 8 | class JsonStringFormatter implements FormatterInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var array |
||
| 12 | */ |
||
| 13 | private static $headers = [ |
||
| 14 | 'application/json', |
||
| 15 | ]; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $header |
||
| 19 | * @return bool |
||
| 20 | */ |
||
| 21 | public static function isJsonHeader($header) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $string |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | public static function isJsonString($string) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function format($response) |
||
| 59 | } |
||
| 60 |