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

buildNodeTypesRequest() protected method

Returns the XML required to request nodetypes
protected buildNodeTypesRequest ( array $nodeTypes ) : string
$nodeTypes array
return string XML with the request information.
    protected function buildNodeTypesRequest(array $nodeTypes)
    {
        $xml = '<?xml version="1.0" encoding="utf-8" ?>' . '<jcr:nodetypes xmlns:jcr="http://www.day.com/jcr/webdav/1.0">';
        if (empty($nodeTypes)) {
            $xml .= '<jcr:all-nodetypes/>';
        } else {
            foreach ($nodeTypes as $nodetype) {
                $xml .= '<jcr:nodetype><jcr:nodetypename>' . $nodetype . '</jcr:nodetypename></jcr:nodetype>';
            }
        }
        $xml .= '</jcr:nodetypes>';
        return $xml;
    }