PHP 클래스 Jackalope\NodeType\NodeTypeManager

In Jackalope, we try to do lazy fetching of node types to reduce overhead. Jackalope supports registering node types, and when using the jackrabbit for transport, there is an additional method registerNodeTypesCnd for the jackrabbit specific textual node type specification
상속: implements IteratorAggregat\IteratorAggregate, implements PHPCR\NodeType\NodeTypeManagerInterface
파일 보기 프로젝트 열기: jackalope/jackalope 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$factory Jackalope\FactoryInterface The factory to instantiate objects.
$fetchedAllFromBackend boolean Methods like hasNodeType() need to fetch all node types. Others like getNodeType() do not need all, but just the requested one. Unless we need all, we only load specific ones and cache them.
$mixinTypes array Cache of already fetched mixin node type instances.
$namespaceRegistry PHPCR\NamespaceRegistryInterface
$nodeTree array Array of arrays with the super type as key and its sub types as values.
$objectManager Jackalope\ObjectManager
$primaryTypes array Cache of already fetched primary node type instances.

공개 메소드들

메소드 설명
__construct ( Jackalope\FactoryInterface $factory, ObjectManager $objectManager, PHPCR\NamespaceRegistryInterface $namespaceRegistry ) Create the node type manager for a session.
createNodeDefinitionTemplate ( ) {@inheritDoc}
createNodeTypeTemplate ( $ntd = null ) {@inheritDoc}
createPropertyDefinitionTemplate ( ) {@inheritDoc}
getAllNodeTypes ( ) {@inheritDoc}
getDeclaredSubtypes ( string $nodeTypeName ) : array Helper method for node types: Returns the declared subtypes of a given nodename.
getIterator ( ) : Iterator Provide Traversable interface: redirect to getAllNodeTypes
getMixinNodeTypes ( ) {@inheritDoc}
getNodeType ( $nodeTypeName ) {@inheritDoc}
getPrimaryNodeTypes ( ) {@inheritDoc}
getSubtypes ( string $nodeTypeName ) : array Helper method for NodeType: Returns all sub types of a node and their sub types.
hasNodeType ( $name ) {@inheritDoc}
registerNodeType ( PHPCR\NodeType\NodeTypeDefinitionInterface $ntd, $allowUpdate ) {@inheritDoc}
registerNodeTypes ( array $definitions, $allowUpdate ) {@inheritDoc}
registerNodeTypesCnd ( $cnd, $allowUpdate ) {@inheritDoc}
unregisterNodeType ( $name ) {@inheritDoc}
unregisterNodeTypes ( array $names ) {@inheritDoc}

보호된 메소드들

메소드 설명
addNodeType ( PHPCR\NodeType\NodeTypeInterface $nodeType ) Stores the node type in our internal structures (flat && tree)
createNodeType ( PHPCR\NodeType\NodeTypeDefinitionInterface $ntd, boolean $allowUpdate ) : NodeType Internally create a node type object
fetchNodeTypes ( string $name = null ) Fetch a node type from backend.

비공개 메소드들

메소드 설명
addToNodeTree ( PHPCR\NodeType\NodeTypeInterface $nodetype ) Adds the declared super types of a node type to the tree to be able to fetch the sub types of those super types later on.

메소드 상세

__construct() 공개 메소드

There may be only one instance per session
public __construct ( Jackalope\FactoryInterface $factory, ObjectManager $objectManager, PHPCR\NamespaceRegistryInterface $namespaceRegistry )
$factory Jackalope\FactoryInterface
$objectManager Jackalope\ObjectManager
$namespaceRegistry PHPCR\NamespaceRegistryInterface

addNodeType() 보호된 메소드

Stores the node type in our internal structures (flat && tree)
protected addNodeType ( PHPCR\NodeType\NodeTypeInterface $nodeType )
$nodeType PHPCR\NodeType\NodeTypeInterface The nodetype to add

createNodeDefinitionTemplate() 공개 메소드

{@inheritDoc}

createNodeType() 보호된 메소드

Internally create a node type object
protected createNodeType ( PHPCR\NodeType\NodeTypeDefinitionInterface $ntd, boolean $allowUpdate ) : NodeType
$ntd PHPCR\NodeType\NodeTypeDefinitionInterface
$allowUpdate boolean whether updating the definition is to be allowed or not
리턴 NodeType the new node type

createNodeTypeTemplate() 공개 메소드

{@inheritDoc}
public createNodeTypeTemplate ( $ntd = null )

createPropertyDefinitionTemplate() 공개 메소드

{@inheritDoc}

fetchNodeTypes() 보호된 메소드

Without a filter parameter, this will fetch all node types from the backend. It is no problem to call this method with null as name, it will remember once it fetched all node types and do nothing after that. On fetch all, already cached node types are kept.
protected fetchNodeTypes ( string $name = null )
$name string type name to fetch. defaults to null which will fetch all nodes.

getAllNodeTypes() 공개 메소드

{@inheritDoc}
public getAllNodeTypes ( )

getDeclaredSubtypes() 공개 메소드

Helper method for node types: Returns the declared subtypes of a given nodename.
또한 보기: NodeType::getDeclaredSubtypes
public getDeclaredSubtypes ( string $nodeTypeName ) : array
$nodeTypeName string
리턴 array with the names of the subnode types pointing to the node type instances

getIterator() 공개 메소드

Provide Traversable interface: redirect to getAllNodeTypes
public getIterator ( ) : Iterator
리턴 Iterator over all node types

getMixinNodeTypes() 공개 메소드

{@inheritDoc}
public getMixinNodeTypes ( )

getNodeType() 공개 메소드

{@inheritDoc}
public getNodeType ( $nodeTypeName )

getPrimaryNodeTypes() 공개 메소드

{@inheritDoc}
public getPrimaryNodeTypes ( )

getSubtypes() 공개 메소드

Helper method for NodeType: Returns all sub types of a node and their sub types.
또한 보기: NodeType::getSubtypes
public getSubtypes ( string $nodeTypeName ) : array
$nodeTypeName string
리턴 array with the names of the subnode types pointing to the node type instances

hasNodeType() 공개 메소드

{@inheritDoc}
public hasNodeType ( $name )

registerNodeType() 공개 메소드

{@inheritDoc}
public registerNodeType ( PHPCR\NodeType\NodeTypeDefinitionInterface $ntd, $allowUpdate )
$ntd PHPCR\NodeType\NodeTypeDefinitionInterface

registerNodeTypes() 공개 메소드

{@inheritDoc}
public registerNodeTypes ( array $definitions, $allowUpdate )
$definitions array

registerNodeTypesCnd() 공개 메소드

{@inheritDoc}
public registerNodeTypesCnd ( $cnd, $allowUpdate )

unregisterNodeType() 공개 메소드

{@inheritDoc}
public unregisterNodeType ( $name )

unregisterNodeTypes() 공개 메소드

{@inheritDoc}
public unregisterNodeTypes ( array $names )
$names array

프로퍼티 상세

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

The factory to instantiate objects.
protected FactoryInterface,Jackalope $factory
리턴 Jackalope\FactoryInterface

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

Methods like hasNodeType() need to fetch all node types. Others like getNodeType() do not need all, but just the requested one. Unless we need all, we only load specific ones and cache them.
protected bool $fetchedAllFromBackend
리턴 boolean

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

Cache of already fetched mixin node type instances.
protected array $mixinTypes
리턴 array

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

protected NamespaceRegistryInterface,PHPCR $namespaceRegistry
리턴 PHPCR\NamespaceRegistryInterface

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

Array of arrays with the super type as key and its sub types as values.
protected array $nodeTree
리턴 array

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

protected ObjectManager,Jackalope $objectManager
리턴 Jackalope\ObjectManager

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

Cache of already fetched primary node type instances.
protected array $primaryTypes
리턴 array