프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$definition | PHPCR\NodeType\NodeDefinitionInterface | Cached instance of the node definition that defines this node | |
$deletedProperties | this is needed in order to track deletions in case of refresh keys are the property names, values the properties (in state deleted) | ||
$index | integer | TODO: fully implement same-name siblings | |
$nodes | array | ordered list of the child node names | |
$originalNodesOrder | array | used to calculate reordering operations if orderBefore() was used | |
$primaryType | string | The primary type name of this node | |
$properties | all properties are instantiated in the constructor OPTIMIZE: lazy instantiate property objects, just have local array of values |
메소드 | 설명 | |
---|---|---|
__construct ( jackalope\FactoryInterface $factory, array $rawData, string $path, jackalope\Session $session, |
Create a new node instance with data from the storage layer | |
addChildNode ( PHPCR\NodeInterface $node, boolean $check, string $name = null ) | Adds child node to this node for internal reference | |
addMixin ( $mixinName ) | {@inheritDoc} | |
addNode ( $relPath, $primaryNodeTypeName = null ) | Creates a new node at the specified $relPath | |
addNodeAutoNamed ( $nameHint = null, $primaryNodeTypeName = null ) | {@inheritDoc} | |
beginTransaction ( ) | {@inheritDoc} | |
canAddMixin ( $mixinName ) | {@inheritDoc} | |
commitTransaction ( ) | {@inheritDoc} | |
confirmSaved ( ) | In addition to calling parent method, tell all properties and clean deletedProperties | |
followLifecycleTransition ( $transition ) | {@inheritDoc} | |
getAllowedLifecycleTransitions ( ) | {@inheritDoc} | |
getCorrespondingNodePath ( $workspaceName ) | {@inheritDoc} | |
getDefinition ( ) | {@inheritDoc} | |
getIdentifier ( ) | {@inheritDoc} | |
getIndex ( ) | {@inheritDoc} | |
getIterator ( ) : Iterator | Provide Traversable interface: redirect to getNodes with no filter | |
getMixinNodeTypes ( ) | {@inheritDoc} | |
getNode ( $relPath ) | {@inheritDoc} | |
getNodeNames ( $nameFilter = null, $typeFilter = null ) | {@inheritDoc} | |
getNodes ( $nameFilter = null, $typeFilter = null ) | {@inheritDoc} | |
getOrderCommands ( ) : array | Returns the orderBefore commands to be applied to the childnodes to get from the original order to the new one | |
getPrimaryItem ( ) | {@inheritDoc} | |
getPrimaryNodeType ( ) | {@inheritDoc} | |
getProperties ( $nameFilter = null ) | {@inheritDoc} | |
getPropertiesForStoreDeletedNode ( ) : |
This method is only meant for the transport to be able to still build a store request for afterwards deleted nodes to support the operationslog. | |
getPropertiesValues ( $nameFilter = null, $dereference = true ) | {@inheritDoc} | |
getProperty ( $relPath ) | {@inheritDoc} | |
getPropertyValue ( $name, $type = null ) | {@inheritDoc} | |
getPropertyValueWithDefault ( $relPath, $defaultValue ) | {@inheritDoc} | |
getReferences ( $name = null ) | {@inheritDoc} | |
getSharedSet ( ) | {@inheritDoc} | |
getWeakReferences ( $name = null ) | {@inheritDoc} | |
hasNode ( $relPath ) | {@inheritDoc} | |
hasNodes ( ) | {@inheritDoc} | |
hasProperties ( ) | {@inheritDoc} | |
hasProperty ( $relPath ) | {@inheritDoc} | |
isCheckedOut ( ) | {@inheritDoc} | |
isLocked ( ) | {@inheritDoc} | |
isNodeType ( $nodeTypeName ) | {@inheritDoc} | |
needsChildReordering ( ) : boolean | Determine whether the children of this node need to be reordered | |
orderBefore ( $srcChildRelPath, $destChildRelPath ) | Jackalope implements this feature and updates the position of the existing child at srcChildRelPath to be in the list immediately before destChildRelPath. | |
remove ( ) | Remove this node | |
removeMixin ( $mixinName ) | {@inheritDoc} | |
removeShare ( ) | {@inheritDoc} | |
removeSharedSet ( ) | {@inheritDoc} | |
rename ( $newName ) | {@inheritDoc} | |
rollbackTransaction ( ) | {@inheritDoc} | |
setChildrenDirty ( ) | Mark all cached children as dirty. | |
setDeleted ( ) | In addition to set this item deleted, set all properties to deleted. | |
setDirty ( $keepChanges = false, $targetState = false ) | Overwrite to set the properties dirty as well. | |
setMixins ( array $mixinNames ) | {@inheritDoc} | |
setPath ( $path, $move = false ) | In addition to calling parent method, tell all properties | |
setPrimaryType ( $nodeTypeName ) | Changes the primary node type of this node to nodeTypeName. | |
setProperty ( $name, $value, $type = PropertyType::UNDEFINED, boolean $validate = true ) | {@inheritDoc} | |
unsetChildNode ( string $name, boolean $check ) | Removes the reference in the internal node storage | |
unsetProperty ( string $name ) | Removes the reference in the internal node storage | |
update ( $srcWorkspace ) | {@inheritDoc} |
메소드 | 설명 | |
---|---|---|
_setProperty ( string $name, mixed $value, string $type, boolean $internal ) : |
Implement really setting the property without any notification. | |
filterNames ( string | array $filter, array $names ) : array | Filter the list of names according to the filter expression / array | |
generateUuid ( ) : string | ||
getChildPath ( string $p ) : string | Make sure $p is an absolute path | |
refresh ( $keepChanges, $internal = false ) | Refresh this node |
메소드 | 설명 | |
---|---|---|
parseData ( array $rawData, boolean $update, boolean $keepChanges = false ) | Initialize or update this object with raw data from backend. |
public __construct ( jackalope\FactoryInterface $factory, array $rawData, string $path, jackalope\Session $session, |
||
$factory | jackalope\FactoryInterface | the object factory |
$rawData | array | in the format as returned from TransportInterface::getNode |
$path | string | the absolute path of this node |
$session | jackalope\Session | |
$objectManager | ||
$new | boolean | set to true if this is a new node being created. Defaults to false which means the node is loaded from storage. |
public addChildNode ( PHPCR\NodeInterface $node, boolean $check, string $name = null ) | ||
$node | PHPCR\NodeInterface | The name of the child node |
$check | boolean | whether to check state |
$name | string | is used in cases where $node->getName would not return the correct name (during move operation) |
public addMixin ( $mixinName ) |
public addNode ( $relPath, $primaryNodeTypeName = null ) |
public addNodeAutoNamed ( $nameHint = null, $primaryNodeTypeName = null ) |
public beginTransaction ( ) |
public commitTransaction ( ) |
public confirmSaved ( ) |
protected getChildPath ( string $p ) : string | ||
$p | string | the relative or absolute property or node path |
리턴 | string | the absolute path to this item, with relative paths resolved against the current node |
public getIterator ( ) : Iterator | ||
리턴 | Iterator | over all child nodes |
public getOrderCommands ( ) : array | ||
리턴 | array | of arrays with 2 fields: name of node to order before second name |
public getPropertiesForStoreDeletedNode ( ) : |
||
리턴 | with just the jcr:primaryType property in it |
public getPropertiesValues ( $nameFilter = null, $dereference = true ) |
public getPropertyValueWithDefault ( $relPath, $defaultValue ) |
public needsChildReordering ( ) : boolean | ||
리턴 | boolean |
public orderBefore ( $srcChildRelPath, $destChildRelPath ) |
protected refresh ( $keepChanges, $internal = false ) |
public remove ( ) |
public rollbackTransaction ( ) |
public setDeleted ( ) |
public setDirty ( $keepChanges = false, $targetState = false ) |
public setPath ( $path, $move = false ) |
public setPrimaryType ( $nodeTypeName ) |
public setProperty ( $name, $value, $type = PropertyType::UNDEFINED, boolean $validate = true ) | ||
$validate | boolean | does the NodeType control throw an exception if the property can't be set? To use in case of UUID import |
public unsetChildNode ( string $name, boolean $check ) | ||
$name | string | the name of the child node to unset |
$check | boolean | whether a state check should be done - set to false during internal update operations |
public unsetProperty ( string $name ) | ||
$name | string | the name of the property to unset. |
protected NodeDefinitionInterface,PHPCR\NodeType $definition | ||
리턴 | PHPCR\NodeType\NodeDefinitionInterface |
protected $deletedProperties |
protected array $originalNodesOrder | ||
리턴 | array |
protected string $primaryType | ||
리턴 | string |