HierarchicalFormat Class Reference

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.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 27 of file HierarchicalFormat.php.

+ Inheritance diagram for HierarchicalFormat:

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)
 
 deserializeValues (Request $request)
 
 afterDeserialize (Request $request)
 
 beforeSerialize (Response $response)
 
 serializeValues (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 ()
 
 isCached (Response $response)
 
 getCacheDate (Response $response)
 

Member Function Documentation

deserializeValues ( Request  $request)
protected
See also
AbstractFormat::deserializeValues()

Definition at line 32 of file HierarchicalFormat.php.

serializeValues ( Response  $response)
protected
See also
AbstractFormat::serializeValues()

Definition at line 39 of file HierarchicalFormat.php.

isSerializedNode (   $value)
protected

Determine if the value is a serialized Node.

The default implementation returns false.

Parameters
$valueThe data value
Returns
Boolean
Note
Subclasses override this if necessary

Definition at line 118 of file HierarchicalFormat.php.

isDeserializedNode (   $value)
protected

Determine if the value is a deserialized Node.

The default implementation checks if the value is an object of type Node.

Parameters
$valueThe data value
Returns
Boolean
Note
Subclasses override this if necessary

Definition at line 129 of file HierarchicalFormat.php.

serializeNode (   $value)
abstractprotected

Serialize a Node.

Parameters
$valueThe data value
Returns
The serialized Node
deserializeNode (   $value)
abstractprotected

Deserialize a Node.

Parameters
$valueThe 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