wCMF
3.6
|
Public Member Functions | |
deserialize (&$request) | |
serialize (&$response) | |
processValues (&$value, $key, $method) | |
beforeDeserialize (&$data) | |
afterDeserialize (&$data) | |
beforeSerialize (&$data) | |
afterSerialize (&$data) | |
isSerializedNode ($key, &$value) | |
isDeserializedNode ($key, &$value) | |
serializeNode ($key, &$value) | |
& | deserializeNode ($key, &$value) |
![]() | |
& | getNode ($oid) |
getNodes () | |
![]() | |
deserialize (&$request) | |
serialize (&$response) | |
Additional Inherited Members | |
![]() | |
$_deserializedNodes = null | |
HierarchicalFormat maybe 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.
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.
Definition at line 31 of file class.HierarchicalFormat.php.
HierarchicalFormat::deserialize | ( | & | $request | ) |
Definition at line 36 of file class.HierarchicalFormat.php.
References afterDeserialize(), ArrayUtil\array_walk_recursive(), and beforeDeserialize().
HierarchicalFormat::serialize | ( | & | $response | ) |
Definition at line 48 of file class.HierarchicalFormat.php.
References afterSerialize(), ArrayUtil\array_walk_recursive(), and beforeSerialize().
HierarchicalFormat::processValues | ( | & | $value, |
$key, | |||
$method | |||
) |
Callback function for array_walk_recursive. De-/Serializes any Node instances using the function given in method parameter.
value | The array value |
key | The array key |
method | The method to apply to each value |
Definition at line 64 of file class.HierarchicalFormat.php.
References EncodingUtil\convertCp1252Utf8ToIso(), isDeserializedNode(), isSerializedNode(), and EncodingUtil\isUtf8().
HierarchicalFormat::beforeDeserialize | ( | & | $data | ) |
Template methods Modify data before deserialization. The default implementation does nothing.
data | A reference to the data array |
Definition at line 85 of file class.HierarchicalFormat.php.
Referenced by deserialize().
HierarchicalFormat::afterDeserialize | ( | & | $data | ) |
Modify data after deserialization. The default implementation does nothing.
data | A reference to the data array |
Definition at line 91 of file class.HierarchicalFormat.php.
Referenced by deserialize().
HierarchicalFormat::beforeSerialize | ( | & | $data | ) |
Modify data before serialization. The default implementation does nothing.
data | A reference to the data array |
Definition at line 98 of file class.HierarchicalFormat.php.
Referenced by serialize().
HierarchicalFormat::afterSerialize | ( | & | $data | ) |
Modify data after serialization. The default implementation does nothing.
data | A reference to the data array |
Definition at line 104 of file class.HierarchicalFormat.php.
Referenced by serialize().
HierarchicalFormat::isSerializedNode | ( | $key, | |
& | $value | ||
) |
Determine if the value is a serialized Node. The default implementation returns false.
key | The data key |
value | A reference to the data value |
Definition at line 114 of file class.HierarchicalFormat.php.
Referenced by processValues().
HierarchicalFormat::isDeserializedNode | ( | $key, | |
& | $value | ||
) |
Determine if the value is a deserialized Node. The default implementation checks if the value is an object of type Node.
key | The data key |
value | A reference to the data value |
Definition at line 126 of file class.HierarchicalFormat.php.
Referenced by processValues().
HierarchicalFormat::serializeNode | ( | $key, | |
& | $value | ||
) |
Serialize a Node
key | The data key |
value | A reference to the data value |
Definition at line 137 of file class.HierarchicalFormat.php.
References WCMFException\throwEx().
& HierarchicalFormat::deserializeNode | ( | $key, | |
& | $value | ||
) |
Deserialize a Node
key | The data key |
value | A reference to the data value |
Definition at line 147 of file class.HierarchicalFormat.php.
References WCMFException\throwEx().