NodeSerializer Interface Reference

Detailed Description

NodeSerializer implementations are used to serialize Nodes into an array representation or deserialize an array representation into Nodes.

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

Definition at line 21 of file NodeSerializer.php.

+ Inheritance diagram for NodeSerializer:

Public Member Functions

 isSerializedNode ($data)
 
 deserializeNode ($data, Node $parent=null, $role=null)
 
 serializeNode ($node)
 

Member Function Documentation

◆ isSerializedNode()

isSerializedNode (   $data)

Check if the given data represent a serialized Node.

Parameters
$dataA variable of any type
Returns
Boolean

Implemented in DionysosNodeSerializer, DojoNodeSerializer, and SoapNodeSerializer.

◆ deserializeNode()

deserializeNode (   $data,
Node  $parent = null,
  $role = null 
)

Deserialize a Node from serialized data.

Only values given in data are being set.

Parameters
$dataAn array containing the serialized Node data
$parentThe parent Node (default: null)
$roleThe role of the serialized Node in relation to parent (default: null)
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

Implemented in DionysosNodeSerializer, DojoNodeSerializer, and SoapNodeSerializer.

◆ serializeNode()

serializeNode (   $node)

Serialize a Node into an array.

Parameters
$nodeThe Node instance to serialize
Returns
Associative array

Implemented in DionysosNodeSerializer, and SoapNodeSerializer.