PHP Класс Jackalope\ImportExport\ImportExport

Implements the uuid behavior interface to import the constants.
Автор: David Buchmann ([email protected])
Наследование: implements PHPCR\ImportUUIDBehaviorInterface
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$escaping array Map of invalid xml names to escaping according to jcr/phpcr spec TODO: more invalid characters?

Открытые методы

Метод Описание
escapeXmlName ( string $name ) : string Helper method for escaping node and property names into valid xml element and attribute names according to the jcr specification.
exportDocumentView ( PHPCR\NodeInterface $node, PHPCR\NamespaceRegistryInterface $ns, resource $stream, boolean $skipBinary, boolean $noRecurse ) Recursively export data to an xml stream in document view format
exportSystemView ( PHPCR\NodeInterface $node, PHPCR\NamespaceRegistryInterface $ns, resource $stream, boolean $skipBinary, boolean $noRecurse ) Recursively export data to an xml stream.
importXML ( PHPCR\NodeInterface $parentNode, PHPCR\NamespaceRegistryInterface $ns, string $uri, integer $uuidBehavior ) Import the xml document from the stream into the repository
unescapeXmlName ( string $name, array $namespaceMap ) : string Helper method to unescape node names that encoded invalid things for xml. At the same time, change document namespace prefix to repository prefix if needed.

Приватные методы

Метод Описание
addNode ( PHPCR\NodeInterface $parentNode, string $nodename, string $type, array $properties, integer $uuidBehavior ) : PHPCR\NodeInterface Helper method for importing to add a node with the proper uuid behavior
cleanNamespace ( string $name, array $namespaceMap ) : string Helper function for importing to ensure prefix is same as in repository
exportDocumentViewRecursive ( PHPCR\NodeInterface $node, PHPCR\NamespaceRegistryInterface $ns, resource $stream, boolean $skipBinary, boolean $noRecurse, boolean $root = false ) Recursively output node and all its children into the file in the document view format
exportNamespaceDeclarations ( PHPCR\NamespaceRegistryInterface $ns, resource $stream ) Helper method to produce the xmlns:.
exportSystemViewRecursive ( PHPCR\NodeInterface $node, PHPCR\NamespaceRegistryInterface $ns, resource $stream, boolean $skipBinary, boolean $noRecurse, boolean $root = false ) Recursively output node and all its children into the file in the system view format
importDocumentView ( PHPCR\NodeInterface $parentNode, PHPCR\NamespaceRegistryInterface $ns, FilteredXMLReader $xml, integer $uuidBehavior, array $namespaceMap = [] ) Import document in system view
importSystemView ( PHPCR\NodeInterface $parentNode, PHPCR\NamespaceRegistryInterface $ns, FilteredXMLReader $xml, integer $uuidBehavior, array $namespaceMap = [] ) Import document in system view

Описание методов

escapeXmlName() публичный статический Метод

Helper method for escaping node and property names into valid xml element and attribute names according to the jcr specification.
public static escapeXmlName ( string $name ) : string
$name string A name possibly containing characters illegal in an XML document.
Результат string The name encoded to be valid xml

exportDocumentView() публичный статический Метод

Recursively export data to an xml stream in document view format
См. также: 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

exportSystemView() публичный статический Метод

Recursively export data to an xml stream.
См. также: SessionInterface::exportSystemView
public static exportSystemView ( 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 exportSystemView
$skipBinary boolean as in exportSystemView
$noRecurse boolean as in exportSystemView

importXML() публичный статический Метод

Import the xml document from the stream into the repository
См. также: SessionInterface::importXML
public static importXML ( PHPCR\NodeInterface $parentNode, PHPCR\NamespaceRegistryInterface $ns, string $uri, integer $uuidBehavior )
$parentNode PHPCR\NodeInterface as in importXML
$ns PHPCR\NamespaceRegistryInterface as in importXML
$uri string as in importXML
$uuidBehavior integer as in importXML

unescapeXmlName() публичный статический Метод

Helper method to unescape node names that encoded invalid things for xml. At the same time, change document namespace prefix to repository prefix if needed.
public static unescapeXmlName ( string $name, array $namespaceMap ) : string
$name string A name encoded with escapeXmlName
$namespaceMap array
Результат string the decoded name

Описание свойств

$escaping публичное статическое свойство

Map of invalid xml names to escaping according to jcr/phpcr spec TODO: more invalid characters?
public static array $escaping
Результат array