function node_export_dsv_encode_node in Node export 7.3
Same name and namespace in other branches
- 6.3 modules/node_export_dsv/node_export_dsv.module \node_export_dsv_encode_node()
Process a node and update $header and $encoded_nodes accordingly.
1 call to node_export_dsv_encode_node()
- node_export_dsv_encode in formats/
dsv.inc - Build DSV string.
File
- formats/
dsv.inc, line 119 - The Node export DSV format handler.
Code
function node_export_dsv_encode_node(&$encoded_nodes, $node_key, $var, $parent = NULL) {
foreach ($var as $k => &$v) {
// Get the new header value.
$header_value = node_export_dsv_encode_header_value($parent, $var, $k);
if (is_object($v) || is_array($v)) {
// Recurse through the structure.
node_export_dsv_encode_node($encoded_nodes, $node_key, $v, $header_value);
}
else {
// Create a safe text version of this value and store it against the header using a safe key.
$encoded_nodes[$header_value][$node_key] = node_export_dsv_encode_sanitize_value($v);
}
}
}