Formatter Interface Reference
Detailed Description
Formatter is the single entry point for request/response formatting.
It chooses the configured formatter based on the format property of the request by getting the value XXXFormat from the configuration section 'formats'.
Definition at line 23 of file Formatter.php.
Inheritance diagram for Formatter:
Public Member Functions | |
getFormatFromMimeType ($mimeType) | |
deserialize (Request $request) | |
serialize (Response $response) | |
Member Function Documentation
getFormatFromMimeType | ( | $mimeType | ) |
Get the format name for the given mime type.
- Parameters
-
$mimeType The mime type
- Returns
- String
Implemented in DefaultFormatter.
deserialize | ( | Request | $request | ) |
Deserialize Request data into objects.
- Parameters
-
$request A reference to the Request instance
Implemented in DefaultFormatter.
serialize | ( | Response | $response | ) |
Serialize Response according to the output format.
- Parameters
-
$response A reference to the Response instance
Implemented in DefaultFormatter.