wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
NodeSerializer Class Reference

Public Member Functions

deserializeNode ($type, $data, $hasFlattendedValues, $parent=null)
 
 deserializeValue (&$node, $key, $value, $dataType, $hasFlattendedValues)
 
 serializeNode (&$obj, $flattenValues)
 
 serializeAttribute (&$node, $valueName, $dataType, &$result, $flattenDataTypes)
 
getArray ()
 
getPathArray (&$array, $path, $curDepth)
 

Detailed Description

NodeSerializer provides helper functions to de-/serialize Nodes.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.NodeSerializer.php 1462 2014-02-04 23:52:27Z iherwig
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 31 of file class.NodeSerializer.php.

Member Function Documentation

& NodeSerializer::deserializeNode (   $type,
  $data,
  $hasFlattendedValues,
  $parent = null 
)

Deserialize a Node from serialized data. Only values given in data are be set.

Parameters
typeThe type the data belong to
dataThe serialized node data (either as object or as array)
hasFlattendedValuesTrue if all node data is serialized into one array, false if there is an extra array 'values', that holds the data types and inside these the values
parentThe parent node [default: null]
Returns
A reference to the node deserialized from the data or null if the type does not exist

Definition at line 42 of file class.NodeSerializer.php.

References deserializeValue(), PersistenceFacade\getInstance(), and PersistenceFacade\isKnownType().

Referenced by SOAPFormat\deserializeNode(), JSONFormat\deserializeNode(), and deserializeValue().

+ Here is the call graph for this function:

NodeSerializer::deserializeValue ( $node,
  $key,
  $value,
  $dataType,
  $hasFlattendedValues 
)

Deserialize an node value

Parameters
nodeA reference to the node
keyThe value name or type if value is an array
valueThe value or child data, if value is an array
dataTypeThe dataType of the value
hasFlattendedValues

Definition at line 108 of file class.NodeSerializer.php.

References deserializeNode().

Referenced by deserializeNode().

+ Here is the call graph for this function:

NodeSerializer::serializeNode ( $obj,
  $flattenValues 
)

Serialize a Node into an array

Parameters
objA reference to the node to serialize
flattenValuesTrue if all node data should be serialized into one array, false if there should be an extra array 'values', that holds the data types and inside these the values
Returns
The node serialized into an associated array

Definition at line 128 of file class.NodeSerializer.php.

References getArray(), RightsManager\getInstance(), and getPathArray().

Referenced by SOAPFormat\serializeNode(), and JSONFormat\serializeNode().

+ Here is the call graph for this function:

NodeSerializer::serializeAttribute ( $node,
  $valueName,
  $dataType,
$result,
  $flattenDataTypes 
)

Callback function for NodeProcessor (see NodeProcessor).

Definition at line 181 of file class.NodeSerializer.php.

& NodeSerializer::getArray ( )

Definition at line 194 of file class.NodeSerializer.php.

Referenced by serializeNode().

& NodeSerializer::getPathArray ( $array,
  $path,
  $curDepth 
)

Definition at line 200 of file class.NodeSerializer.php.

Referenced by serializeNode().


The documentation for this class was generated from the following file: