Jackalope\Transport\Jackrabbit\Client::buildRegisterNodeTypeRequest PHP Method

buildRegisterNodeTypeRequest() protected method

Build the xml required to register node types
Author: david at liip.ch
protected buildRegisterNodeTypeRequest ( string $cnd, $allowUpdate ) : string
$cnd string the node type definition
return string XML with register request
    protected function buildRegisterNodeTypeRequest($cnd, $allowUpdate)
    {
        $cnd = '<dcr:cnd>' . str_replace(array('<', '>'), array('&lt;', '&gt;'), $cnd) . '</dcr:cnd>';
        $cnd .= '<dcr:allowupdate>' . ($allowUpdate ? 'true' : 'false') . '</dcr:allowupdate>';
        return '<?xml version="1.0" encoding="UTF-8" standalone="no"?><D:propertyupdate xmlns:D="DAV:"><D:set><D:prop><dcr:nodetypes-cnd xmlns:dcr="http://www.day.com/jcr/webdav/1.0">' . $cnd . '</dcr:nodetypes-cnd></D:prop></D:set></D:propertyupdate>';
    }