Exemple #1
0
function replace_node_property(NodeSchema $node_schema, $property_name, $pattern, $replacement)
{
    $mapper = new NodePropertyMapper($node_schema, $property_name, function (Node $node) use(&$mapper, $pattern, $replacement) {
        return $mapper->replace($node, $pattern, $replacement);
    });
    $mapper->run();
}
Exemple #2
0
function split_node_property(NodeSchema $node_schema, $property_name, $delimeter)
{
    $mapper = new NodePropertyMapper($node_schema, $property_name, function (Node $node) use(&$mapper, $delimeter) {
        return $mapper->split($node, $delimeter);
    });
    $mapper->run();
}
Exemple #3
0
function rename_node_property(NodeSchema $node_schema, $property_name, $new_property_name)
{
    $mapper = new NodePropertyMapper($node_schema, $property_name, function (Node $node) use(&$mapper, $new_property_name) {
        return $mapper->rename($node, $new_property_name);
    });
    $mapper->run();
}