Detailed Description
AbstractFormat is used as base class for specialized formats.
Definition at line 27 of file AbstractFormat.php.
Public Member Functions | |
deserialize (Request $request) | |
serialize (Response $response) | |
getResponseHeaders (Response $response) | |
Public Member Functions inherited from Format | |
getMimeType (Response $response=null) | |
isCached (Response $response) | |
getCacheDate (Response $response) | |
Protected Member Functions | |
beforeDeserialize (Request $request) | |
deserializeValues (Request $request) | |
afterDeserialize (Request $request) | |
beforeSerialize (Response $response) | |
serializeValues (Response $response) | |
afterSerialize (Response $response) | |
getNode (ObjectId $oid) | |
filterValue ($value, AttributeDescription $attribute) | |
Member Function Documentation
◆ deserialize()
deserialize | ( | Request | $request | ) |
◆ serialize()
serialize | ( | Response | $response | ) |
◆ getResponseHeaders()
getResponseHeaders | ( | Response | $response | ) |
- See also
- Format::getResponseHeaders()
Implements Format.
Reimplemented in DownloadFormat.
Definition at line 52 of file AbstractFormat.php.
◆ beforeDeserialize()
|
protected |
Modify data before deserialization.
The default implementation does nothing.
- Parameters
-
$request The request
- Returns
- Array/object of values
- Note
- Subclasses override this if necessary
Definition at line 63 of file AbstractFormat.php.
◆ deserializeValues()
|
abstractprotected |
Deserialize an array of values.
- Parameters
-
$request The request
- Returns
- Array/object of values
Reimplemented in HtmlFormat, DownloadFormat, GenericFormat, NullFormat, and HierarchicalFormat.
◆ afterDeserialize()
|
protected |
Modify data after deserialization.
The default implementation does nothing.
- Parameters
-
$request The request
- Returns
- Array/object of values
- Note
- Subclasses override this if necessary
Definition at line 80 of file AbstractFormat.php.
◆ beforeSerialize()
|
protected |
Modify data before serialization.
The default implementation does nothing.
- Parameters
-
$response The response
- Returns
- Array/object of values
- Note
- Subclasses override this if necessary
Definition at line 90 of file AbstractFormat.php.
◆ serializeValues()
|
abstractprotected |
Serialize an array of values.
- Parameters
-
$response The response
- Returns
- Array/object of values
Reimplemented in HtmlFormat, DownloadFormat, GenericFormat, NullFormat, and HierarchicalFormat.
◆ afterSerialize()
|
protected |
Modify data after serialization.
The default implementation does nothing.
- Parameters
-
$response The response
- Returns
- Array/object of values
- Note
- Subclasses override this if necessary
Reimplemented in JsonFormat, and GenericFormat.
Definition at line 107 of file AbstractFormat.php.
◆ getNode()
|
protected |
Helper methods.
Get a node with the given oid to deserialize values from form fields into it. The method ensures that there is only one instance per oid.
- Parameters
-
$oid The oid
- Returns
- Node
Definition at line 121 of file AbstractFormat.php.
◆ filterValue()
|
protected |
Definition at line 140 of file AbstractFormat.php.