Detailed Description
HierarchicalFormat is used as base class for formats that are able to represent hierarchical data like JSON or XML.
This format automatically iterates over data when de-/serializing and uses template methods to implement the specific format.
Definition at line 27 of file HierarchicalFormat.php.
Protected Member Functions | |
deserializeValues (Request $request) | |
serializeValues (Response $response) | |
isSerializedNode ($value) | |
isDeserializedNode ($value) | |
serializeNode ($value) | |
deserializeNode ($value) | |
Protected Member Functions inherited from AbstractFormat | |
beforeDeserialize (Request $request) | |
afterDeserialize (Request $request) | |
beforeSerialize (Response $response) | |
afterSerialize (Response $response) | |
getNode (ObjectId $oid) | |
filterValue ($value, AttributeDescription $attribute) | |
Additional Inherited Members | |
Public Member Functions inherited from AbstractFormat | |
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) | |
Member Function Documentation
◆ deserializeValues()
|
protected |
Reimplemented from AbstractFormat.
Definition at line 32 of file HierarchicalFormat.php.
◆ serializeValues()
|
protected |
Reimplemented from AbstractFormat.
Definition at line 39 of file HierarchicalFormat.php.
◆ isSerializedNode()
|
protected |
Determine if the value is a serialized Node.
The default implementation returns false.
- Parameters
-
$value The data value
- Returns
- Boolean
- Note
- Subclasses override this if necessary
Reimplemented in JsonFormat, and SoapFormat.
Definition at line 120 of file HierarchicalFormat.php.
◆ isDeserializedNode()
|
protected |
Determine if the value is a deserialized Node.
The default implementation checks if the value is an object of type Node.
- Parameters
-
$value The data value
- Returns
- Boolean
- Note
- Subclasses override this if necessary
Definition at line 131 of file HierarchicalFormat.php.
◆ serializeNode()
|
abstractprotected |
Serialize a Node.
- Parameters
-
$value The data value
- Returns
- The serialized Node
Reimplemented in JsonFormat, and SoapFormat.
◆ deserializeNode()
|
abstractprotected |
Deserialize a Node.
- Parameters
-
$value The data value
- Returns
- An array with keys 'node' and 'data' where the node value is the Node instance and the data value is the remaining part of data, that is not used for deserializing the Node
Reimplemented in JsonFormat, and SoapFormat.