function node_export_dsv_encode_header_value 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_header_value()
Create header value from $parents, $var, and $k.
1 call to node_export_dsv_encode_header_value()
- node_export_dsv_encode_node in formats/
dsv.inc - Process a node and update $header and $encoded_nodes accordingly.
File
- formats/
dsv.inc, line 182 - The Node export DSV format handler.
Code
function node_export_dsv_encode_header_value($parents, $var, $k) {
if (is_null($parents)) {
// Special case; on the first level do not prefix the key.
$header_value = $k;
}
elseif (is_object($var)) {
$header_value = $parents . "->" . $k;
}
elseif (is_array($var)) {
$header_value = $parents . "['" . $k . "']";
}
return $header_value;
}