Format Interface Reference
Detailed Description
Format defines the interface for all format classes.
Format instances are used to map external data representations like JSON, XML/SOAP or HTML to internal ones. All data values are supposed to be scalar or array values except for Nodes, for which each external representation defines a special notation.
Definition at line 24 of file Format.php.
Inheritance diagram for Format:
Public Member Functions | |
getMimeType () | |
deserialize (Request $request) | |
serialize (Response $response) | |
Member Function Documentation
getMimeType | ( | ) |
Get the MIME type of the format.
- Returns
- String
Implemented in JsonFormat, HtmlFormat, SoapFormat, and NullFormat.
deserialize | ( | Request | $request | ) |
Deserialize Request data from the external representation into Nodes and scalars/arrays.
- Parameters
-
$request A reference to the Request instance
Implemented in AbstractFormat, and NullFormat.
serialize | ( | Response | $response | ) |
Serialize Response data according to the external representation.
- Parameters
-
$response A reference to the Response instance
Implemented in AbstractFormat, and NullFormat.