| 1 | <?php namespace KamranAhmed\Smasher; |
||
| 10 | class JsonResponse implements ResponseContract |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Formats the passed data/array to json |
||
| 14 | * @param array $data The data which is to be encoded |
||
| 15 | * @return string |
||
| 16 | */ |
||
| 17 | 2 | public function encode($data) |
|
| 21 | |||
| 22 | /** |
||
| 23 | * Decodes the passed string and creates array from it |
||
| 24 | * @param string $response The existing response which is to be decoded to array |
||
| 25 | * @return array |
||
| 26 | */ |
||
| 27 | 3 | public function decode($response) |
|
| 31 | } |
||
| 32 |