| 1 | <?php |
||
| 11 | class SymfonySerializerContentNegotiation implements ContentNegotiation |
||
| 12 | { |
||
| 13 | protected $app; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param Application $app |
||
| 17 | */ |
||
| 18 | 6 | public function __construct(Application $app) |
|
| 22 | |||
| 23 | /** |
||
| 24 | * This method can be used in place of Response::create to automatically serialize your response into the requested |
||
| 25 | * format. |
||
| 26 | * |
||
| 27 | * @param object $responseObject |
||
| 28 | * @param int $status |
||
| 29 | * @param array $headers |
||
| 30 | * @return Response |
||
| 31 | */ |
||
| 32 | 3 | public function createResponse($responseObject, $status = 200, array $headers = array()) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * This method retrieves the request body in any supported format and deserializes it. |
||
| 42 | * |
||
| 43 | * @param string $className |
||
| 44 | * @return object |
||
| 45 | */ |
||
| 46 | 3 | public function deserializeRequest($className) |
|
| 57 | } |
||
| 58 |