Property | Type | Description | |
---|---|---|---|
$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 |
Method | Description | |
---|---|---|
__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} |
Method | Description | |
---|---|---|
_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 |
Method | Description | |
---|---|---|
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 ( ) |
public followLifecycleTransition ( $transition ) |
protected generateUuid ( ) : string | ||
return | string | a universally unique id. |
public getAllowedLifecycleTransitions ( ) |
protected getChildPath ( string $p ) : string | ||
$p | string | the relative or absolute property or node path |
return | string | the absolute path to this item, with relative paths resolved against the current node |
public getCorrespondingNodePath ( $workspaceName ) |
public getIterator ( ) : Iterator | ||
return | Iterator | over all child nodes |
public getNodeNames ( $nameFilter = null, $typeFilter = null ) |
public getOrderCommands ( ) : array | ||
return | array | of arrays with 2 fields: name of node to order before second name |
public getPropertiesForStoreDeletedNode ( ) : |
||
return | with just the jcr:primaryType property in it |
public getPropertiesValues ( $nameFilter = null, $dereference = true ) |
public getPropertyValueWithDefault ( $relPath, $defaultValue ) |
public needsChildReordering ( ) : boolean | ||
return | 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 | ||
return | PHPCR\NodeType\NodeDefinitionInterface |
protected $deletedProperties |
protected int $index | ||
return | integer |
protected array $originalNodesOrder | ||
return | array |
protected string $primaryType | ||
return | string |