protected function build_node_path($id, $name = '', $root = '') {
        $path = $id;
        if (!empty($name)) {
            $path .= '|' . urlencode($name);
        }
        if (!empty($root)) {
            $path = trim($root, '/') . '/' . $path;
        }
        return $path;
    }
protected function build_node_path($id, $name = '', $root = '') {
        $path = $id;
        if (!empty($name)) {
            $path .= '|' . urlencode($name);
        }
        if (!empty($root)) {
            $path = trim($root, '/') . '/' . $path;
        }
        return $path;
    }
protected function build_node_path ( $ id , $ name = '' , $ root = '' ) { $ path = $ id ; if ( ! empty ( $ name ) ) { $ path .= '|' . urlencode ( $ name ) ; } if ( ! empty ( $ root ) ) { $ path = trim ( $ root , '/' ) . '/' . $ path ; } return $ path ; }
Generates a safe path to a node.

Typically, a node will be id|Name of the node.

@param string $id of the node.
@param string $name of the node, will be URL encoded.
@param string $root to append the node on, must be a result of this function.
@return string path to the node.
Generates a safe path to a node .