PHP 클래스 Neos\ContentRepository\Domain\Service\ImportExport\NodeImportService

Internally, uses associative arrays instead of Domain Models for performance reasons, so "nodeData" in this class is always an associative array.
파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$entityManager Doctrine\Common\Persistence\ObjectManager ..
$nodeDataPropertyNames array For each element, an array of additional settings can be specified; currently the only setting is the following: - columnType => \PDO::PARAM_*
$nodeDataStack array
$nodeIdentifierStack array
$nodeNameStack array
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$propertyMapper Neos\Flow\Property\PropertyMapper
$propertyMappingConfiguration ImportExportPropertyMappingConfiguration
$securityContext Neos\Flow\Security\Context

공개 메소드들

메소드 설명
import ( XMLReader $xmlReader, string $targetPath, string $resourceLoadPath = null ) : void Imports the sub-tree from the xml reader into the given target path.

보호된 메소드들

메소드 설명
convertElementToValue ( XMLReader $reader, string $currentType, string $currentEncoding, string $currentClassName, string $currentNodeIdentifier, string $currentProperty ) : mixed Convert an element to the value it represents.
determineFormatVersion ( XMLReader $xmlReader ) : null | string Determines the ContentRepository format version of the given xml
getCurrentPath ( ) : string Provides the path for a NodeData according to the current stacks
getParentPath ( string $path ) : string Provides the parent of the given path
importSubtree ( XMLReader $xmlReader ) : void Imports the sub-tree from the xml reader into the given target path.
parseArrayElements ( XMLReader $reader, string $elementName, string $currentNodeIdentifier ) : array Parses the content of exported array and returns the values
parseDimensionsElement ( XMLReader $reader ) : array Parses the content of the dimensions-tag and returns the dimensions as an array 'dimension name' => dimension value
parseElement ( XMLReader $xmlReader ) : void Parses the given XML element and adds its content to the internal content tree
parseEndElement ( XMLReader $reader ) : void Parses the closing tags writes data to the database then
parsePropertiesElement ( XMLReader $reader, string $currentNodeIdentifier ) : array Parses the content of the properties-tag and returns the properties as an array 'property name' => property value
persistEntities ( mixed $propertyValue ) : void Checks if a propertyValue contains an entity and persists it.
persistNodeData ( array $nodeData ) : void Saves the given array as a node data entity without using the ORM.

메소드 상세

convertElementToValue() 보호된 메소드

Convert an element to the value it represents.
protected convertElementToValue ( XMLReader $reader, string $currentType, string $currentEncoding, string $currentClassName, string $currentNodeIdentifier, string $currentProperty ) : mixed
$reader XMLReader
$currentType string current element (userland) type
$currentEncoding string date encoding of element
$currentClassName string class name of element
$currentNodeIdentifier string identifier of the node
$currentProperty string current property name
리턴 mixed

determineFormatVersion() 보호된 메소드

Determines the ContentRepository format version of the given xml
protected determineFormatVersion ( XMLReader $xmlReader ) : null | string
$xmlReader XMLReader
리턴 null | string the version as a string or null if the version could not be determined

getCurrentPath() 보호된 메소드

Provides the path for a NodeData according to the current stacks
protected getCurrentPath ( ) : string
리턴 string

getParentPath() 보호된 메소드

Provides the parent of the given path
protected getParentPath ( string $path ) : string
$path string path to get parent for
리턴 string parent path

import() 공개 메소드

The root node of the imported tree becomes a child of the node specified as the target path, as the following example illustrates: 1. Existing Nodes Before Import: path - to - - my - - - targetNode - - - - A - other - - nodes 2. Sub-tree in xml to import to 'path/to/my/targetNode': - 3. existing nodes after the import: path - to - - my - - - targetNode - - - - A - - - - B - - - - - B1 - another - - sub-tree
public import ( XMLReader $xmlReader, string $targetPath, string $resourceLoadPath = null ) : void
$xmlReader XMLReader The XML input to import - must be either XML as a string or a prepared \XMLReader instance containing XML data
$targetPath string path to the node which becomes parent of the root of the imported sub-tree
$resourceLoadPath string
리턴 void

importSubtree() 보호된 메소드

The root node of the imported tree becomes a child of the node specified by target path. This parser uses the depth-first reading strategy, which means it will read the input from top til bottom.
protected importSubtree ( XMLReader $xmlReader ) : void
$xmlReader XMLReader A prepared XML Reader with the structure to import
리턴 void

parseArrayElements() 보호된 메소드

Parses the content of exported array and returns the values
protected parseArrayElements ( XMLReader $reader, string $elementName, string $currentNodeIdentifier ) : array
$reader XMLReader reader positioned just after an opening array-tag
$elementName string
$currentNodeIdentifier string
리턴 array the array values

parseDimensionsElement() 보호된 메소드

Parses the content of the dimensions-tag and returns the dimensions as an array 'dimension name' => dimension value
protected parseDimensionsElement ( XMLReader $reader ) : array
$reader XMLReader reader positioned just after an opening dimensions-tag
리턴 array the dimension values

parseElement() 보호된 메소드

Parses the given XML element and adds its content to the internal content tree
protected parseElement ( XMLReader $xmlReader ) : void
$xmlReader XMLReader The XML Reader with the element to be parsed as its root
리턴 void

parseEndElement() 보호된 메소드

Parses the closing tags writes data to the database then
protected parseEndElement ( XMLReader $reader ) : void
$reader XMLReader
리턴 void

parsePropertiesElement() 보호된 메소드

Parses the content of the properties-tag and returns the properties as an array 'property name' => property value
protected parsePropertiesElement ( XMLReader $reader, string $currentNodeIdentifier ) : array
$reader XMLReader reader positioned just after an opening properties-tag
$currentNodeIdentifier string
리턴 array the properties

persistEntities() 보호된 메소드

Checks if a propertyValue contains an entity and persists it.
protected persistEntities ( mixed $propertyValue ) : void
$propertyValue mixed
리턴 void

persistNodeData() 보호된 메소드

If the node data already exists (same dimensions, same identifier, same workspace) it is replaced.
protected persistNodeData ( array $nodeData ) : void
$nodeData array node data to save as an associative array ( $column_name => $value )
리턴 void

프로퍼티 상세

$entityManager 보호되어 있는 프로퍼티

..
protected ObjectManager,Doctrine\Common\Persistence $entityManager
리턴 Doctrine\Common\Persistence\ObjectManager

$nodeDataPropertyNames 보호되어 있는 프로퍼티

For each element, an array of additional settings can be specified; currently the only setting is the following: - columnType => \PDO::PARAM_*
protected array $nodeDataPropertyNames
리턴 array

$nodeDataStack 보호되어 있는 프로퍼티

protected array $nodeDataStack
리턴 array

$nodeIdentifierStack 보호되어 있는 프로퍼티

protected array $nodeIdentifierStack
리턴 array

$nodeNameStack 보호되어 있는 프로퍼티

protected array $nodeNameStack
리턴 array

$persistenceManager 보호되어 있는 프로퍼티

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
리턴 Neos\Flow\Persistence\PersistenceManagerInterface

$propertyMapper 보호되어 있는 프로퍼티

protected PropertyMapper,Neos\Flow\Property $propertyMapper
리턴 Neos\Flow\Property\PropertyMapper

$propertyMappingConfiguration 보호되어 있는 프로퍼티

protected ImportExportPropertyMappingConfiguration,Neos\ContentRepository\Domain\Service\ImportExport $propertyMappingConfiguration
리턴 ImportExportPropertyMappingConfiguration

$securityContext 보호되어 있는 프로퍼티

protected Context,Neos\Flow\Security $securityContext
리턴 Neos\Flow\Security\Context