Jackalope\ImportExport\ImportExport::exportDocumentView PHP Method

exportDocumentView() public static method

Recursively export data to an xml stream in document view format
See also: SessionInterface::exportDocumentView
public static exportDocumentView ( PHPCR\NodeInterface $node, PHPCR\NamespaceRegistryInterface $ns, resource $stream, boolean $skipBinary, boolean $noRecurse )
$node PHPCR\NodeInterface The node to start exporting at
$ns PHPCR\NamespaceRegistryInterface The namespace registry to export namespaces too
$stream resource as in exportDocumentView
$skipBinary boolean as in exportDocumentView
$noRecurse boolean as in exportDocumentView
    public static function exportDocumentView(NodeInterface $node, NamespaceRegistryInterface $ns, $stream, $skipBinary, $noRecurse)
    {
        fwrite($stream, '<?xml version="1.0" encoding="UTF-8"?>' . "\n");
        self::exportDocumentViewRecursive($node, $ns, $stream, $skipBinary, $noRecurse, true);
    }

Usage Example

Example #1
0
 /**
  * {@inheritDoc}
  *
  * @api
  */
 public function exportDocumentView($absPath, $stream, $skipBinary, $noRecurse)
 {
     ImportExport::exportDocumentView($this->getNode($absPath), $this->workspace->getNamespaceRegistry(), $stream, $skipBinary, $noRecurse);
 }