PHP Class Jackalope\ObjectManager

For write operations, the object manager acts as the Unit of Work handler: it keeps track which nodes are dirty and updates them with the transport interface.
Exibir arquivo Open project: jackalope/jackalope Class Usage Examples

Protected Properties

Property Type Description
$factory jackalope\FactoryInterface The factory to instantiate objects
$nodesAdd Jackalope\Transport\AddNodeOperation[] Keys are the full paths to be added
$nodesMove Jackalope\Transport\MoveNodeOperation[] Keys are the source paths, values the move operations containing the target path. The objectsByPath array is updated immediately and any getItem and similar requests are rewritten for the transport layer until save() Only nodes can be moved, not properties. Note: Keep in mind that moving also affects all children of the moved node, but we only have the explicitly moved paths in this array. We check on moved parents whenever retrieving a non-cached node.
$nodesRemove Jackalope\Transport\RemoveNodeOperation[] Keys are the full paths to be removed. Note: Keep in mind that a delete is recursive, but we only have the explicitly deleted paths in this array. We check on deleted parents whenever retrieving a non-cached node.
$objectsByPath array There is no notion of order here. The order is defined by order in the Node::nodes array.
$objectsByUuid array Take care never to put a path in here unless there is a node for that path in objectsByPath.
$operationsLog Jackalope\Transport\Operation[] Add, remove and move actions need to be saved in the correct order to avoid i.e. adding something where a node has not yet been moved to.
$propertiesRemove Jackalope\Transport\RemovePropertyOperation[] Keys are the full paths of properties to be removed.
$session PHPCR\SessionInterface
$transport Jackalope\Transport\TransportInterface

Public Methods

Method Description
__construct ( jackalope\FactoryInterface $factory, Jackalope\Transport\TransportInterface $transport, PHPCR\SessionInterface $session ) Create the ObjectManager instance with associated session and transport
addNode ( string $absPath, PHPCR\NodeInterface $node ) WRITE: add a node at the specified path. Schedules an add operation for the next save() and caches the node.
addVersionLabel ( $path, $label, $moveLabel )
beginTransaction ( ) Begin new transaction associated with current session.
checkin ( string $absPath ) : PHPCR\Version\VersionInterface Removes the cache of the predecessor version after the node has been checked in.
checkout ( $absPath ) Removes the cache of the predecessor version after the node has been checked in.
clear ( ) Clears the state of the current session
cloneFromImmediately ( string $srcWorkspace, string $srcAbsPath, string $destAbsPath, boolean $removeExisting ) Implement the workspace clone method. It is dispatched immediately.
commitTransaction ( ) Complete the transaction associated with the current session.
copyNodeImmediately ( string $srcAbsPath, string $destAbsPath, string $srcWorkspace ) Implement the workspace copy method. It is dispatched immediately.
filterChildNodeNamesByType ( PHPCR\NodeInterface $node, string | array $nameFilter, string | array $typeFilter ) : ArrayIterato\ArrayIterator This method will either let the transport filter if that is possible or forward to getNodes and return the names of the nodes found there.,
getBinaryStream ( string $path ) : resource Retrieves the stream for a binary value.
getCachedDescendants ( string $absPath, string $class = 'Node' ) : ArrayIterato\ArrayIterator Return an ArrayIterator containing all the cached children of the given node.
getCachedNode ( string $absPath, $class = 'Node' ) : PHPCR\NodeInterface Get a node if it is already in cache or null otherwise.
getCachedNodeByUuid ( $uuid, string $class = 'Node' ) : PHPCR\NodeInterface Get a node if it is already in cache or null otherwise.
getNode ( string $relPath, string $context, string $class = 'Node' ) : PHPCR\NodeInterface Get the node identified by a relative path.
getNodeByIdentifier ( string $identifier, string $class = 'Node' ) : PHPCR\NodeInterface Get the node identified by an uuid.
getNodeByPath ( string $absPath, string $class = 'Node', object $object = null ) : PHPCR\NodeInterface Get the node identified by an absolute path.
getNodeType ( string $nodeType ) : DOMDocument Get a single nodetype.
getNodeTypes ( array $nodeTypes = [] ) : array | DOMDocument Returns the node types specified by name in the array or all types if no filter is given.
getNodesByIdentifier ( array $identifiers, string $class = 'Node' ) : ArrayIterato\ArrayIterator | Node[] Get the nodes identified by the given UUIDs.
getNodesByPath ( array $absPaths, string $class = 'Node', array | null $typeFilter = null ) : Node[] Get multiple nodes identified by an absolute paths. Missing nodes are ignored.
getNodesByPathAsArray ( $paths, $class = 'Node', $typeFilter = null )
getPermissions ( string $absPath ) : array Return the permissions of the current session on the node given by path.
getPropertiesByPath ( $absPaths ) : ArrayIterato\ArrayIterator Get all nodes of those properties in one batch, then collect the properties of them.
getPropertyByPath ( string $absPath ) : PHPCR\PropertyInterface Get the property identified by an absolute path.
getReferences ( string $path, string $name = null ) : ArrayIterato\ArrayIterator Returns all accessible REFERENCE properties in the workspace that point to the node
getTransport ( ) : Jackalope\Transport\TransportInterface Implementation specific: Transport is used elsewhere, provide it here for Session
getWeakReferences ( string $path, string $name = null ) : ArrayIterato\ArrayIterator Returns all accessible WEAKREFERENCE properties in the workspace that point to the node
hasPendingChanges ( ) : boolean Determine if any object is modified and not saved to storage.
isNodeDeleted ( string $absPath ) : boolean Check whether the node at path has an unpersisted delete operation and there is no other node moved or added there.
isNodeMoved ( string $absPath ) : boolean Check whether a node path has an unpersisted move operation.
moveNode ( string $srcAbsPath, string $destAbsPath ) WRITE: move node from source path to destination path
moveNodeImmediately ( string $srcAbsPath, string $destAbsPath ) Implement the workspace move method. It is dispatched to transport immediately.
purgeDisappearedNode ( string $absPath, boolean $keepChanges ) : boolean Purge an item given by path from the cache and return whether the node should forget it or keep it.
refresh ( boolean $keepChanges ) Refresh cached items from the backend.
registerNodeTypes ( array $types, boolean $allowUpdate ) : boolean Register node types with the backend.
registerNodeTypesCnd ( string $cnd, boolean $allowUpdate ) : boolean | Iterator Register node types with compact node definition format
removeItem ( string $absPath, PHPCR\PropertyInterface $property = null ) Remove a node or a property.
removeItemImmediately ( string $absPath ) Implement the workspace removeItem method.
removeVersion ( string $versionPath, string $versionName ) Remove a version given the path to the version node and the version name.
removeVersionLabel ( $path, $label )
restore ( boolean $removeExisting, string $versionPath, string $nodePath ) Restore the node at $nodePath to the version at $versionPath
rollbackTransaction ( ) Roll back the transaction associated with the current session.
save ( ) Push all recorded changes to the backend.

Protected Methods

Method Description
cascadeDelete ( string $absPath, boolean $sessionOperation = true ) Notify all cached children that they are deleted as well and clean up internal state
cascadeDeleteVersion ( string $absPath ) Notify all cached version children that they are deleted as well and clean up internal state
executeBatch ( integer $type, Jackalope\Transport\Operation[] $operations ) Execute a batch of operations of one type.
executeOperations ( array $operations ) Execute the recorded operations in the right order, skipping stale data.
getFetchPath ( string $absPath, string $class ) : string Resolve the path through all pending operations and sanity check while doing this.
getNodePath ( string $absPath ) : array Get the node path for a property, and the property name
notifyItems ( string $method ) Notifies the given node and all of its children and properties that a transaction has begun, was committed or rolled back so that the item has a chance to save or restore his internal state.
pathArrayToPropertiesIterator ( array $propertyPaths ) : ArrayIterato\ArrayIterator Transform an array containing properties paths to an ArrayIterator over Property objects
performNodeRemove ( string $absPath, PHPCR\NodeInterface $node, boolean $sessionOperation = true, $cascading = false ) Remove the item at absPath from local cache and keep information for undo.
performPropertyRemove ( string $absPath, PHPCR\PropertyInterface $property, boolean $sessionOperation = true ) Remove the item at absPath from local cache and keep information for undo.
rewriteItemPaths ( string $curPath, string $newPath ) Rewrites the path of a node for the movement operation, also updating all cached children.

Private Methods

Method Description
getMoveSrcPath ( string $dstPath ) : string | boolean Get the src path of a move operation knowing the target path.
matchNodeType ( PHPCR\NodeInterface $node, array $typeFilter ) : boolean Check if a node is of any of the types listed in typeFilter.

Method Details

__construct() public method

Create the ObjectManager instance with associated session and transport
public __construct ( jackalope\FactoryInterface $factory, Jackalope\Transport\TransportInterface $transport, PHPCR\SessionInterface $session )
$factory jackalope\FactoryInterface the object factory
$transport Jackalope\Transport\TransportInterface
$session PHPCR\SessionInterface

addNode() public method

WRITE: add a node at the specified path. Schedules an add operation for the next save() and caches the node.
public addNode ( string $absPath, PHPCR\NodeInterface $node )
$absPath string the path to the node or property, including the item name
$node PHPCR\NodeInterface The item instance that is added.

addVersionLabel() public method

See also: VersioningInterface::addVersionLabel
public addVersionLabel ( $path, $label, $moveLabel )

beginTransaction() public method

Begin new transaction associated with current session.
public beginTransaction ( )

cascadeDelete() protected method

Notify all cached children that they are deleted as well and clean up internal state
protected cascadeDelete ( string $absPath, boolean $sessionOperation = true )
$absPath string parent node that was removed
$sessionOperation boolean to carry over the session operation information

cascadeDeleteVersion() protected method

Notify all cached version children that they are deleted as well and clean up internal state
protected cascadeDeleteVersion ( string $absPath )
$absPath string parent version node that was removed

checkin() public method

TODO: document more clearly
See also: VersionManager::checkin
public checkin ( string $absPath ) : PHPCR\Version\VersionInterface
$absPath string
return PHPCR\Version\VersionInterface node version

checkout() public method

TODO: document more clearly. This looks like copy-paste from checkin
See also: VersionManager::checkout
public checkout ( $absPath )

clear() public method

Removes all cached objects, planned changes etc. Mostly useful for testing purposes.
Deprecation: : this will screw up major, as the user of the api can still have references to nodes. USE refresh instead!
public clear ( )

cloneFromImmediately() public method

http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.10%20Corresponding%20Nodes http://www.day.com/specs/jcr/2.0/10_Writing.html#10.8%20Cloning%20and%20Updating%20Nodes
See also: Workspace::cloneFrom()
public cloneFromImmediately ( string $srcWorkspace, string $srcAbsPath, string $destAbsPath, boolean $removeExisting )
$srcWorkspace string the name of the workspace from which the copy is to be made.
$srcAbsPath string the path of the node to be cloned.
$destAbsPath string the location to which the node at srcAbsPath is to be cloned in this workspace.
$removeExisting boolean

commitTransaction() public method

TODO: Make sure RollbackException and AccessDeniedException are thrown by the transport if corresponding problems occur.
public commitTransaction ( )

copyNodeImmediately() public method

Implement the workspace copy method. It is dispatched immediately.
See also: Workspace::copy()
public copyNodeImmediately ( string $srcAbsPath, string $destAbsPath, string $srcWorkspace )
$srcAbsPath string the path of the node to be copied.
$destAbsPath string the location to which the node at srcAbsPath is to be copied in this workspace.
$srcWorkspace string the name of the workspace from which the copy is to be made.

executeBatch() protected method

Execute a batch of operations of one type.
protected executeBatch ( integer $type, Jackalope\Transport\Operation[] $operations )
$type integer type of the operations to be executed
$operations Jackalope\Transport\Operation[] list of same type operations

executeOperations() protected method

Execute the recorded operations in the right order, skipping stale data.
protected executeOperations ( array $operations )
$operations array

filterChildNodeNamesByType() public method

This method will either let the transport filter if that is possible or forward to getNodes and return the names of the nodes found there.,
public filterChildNodeNamesByType ( PHPCR\NodeInterface $node, string | array $nameFilter, string | array $typeFilter ) : ArrayIterato\ArrayIterator
$node PHPCR\NodeInterface
$nameFilter string | array
$typeFilter string | array
return ArrayIterato\ArrayIterator

getBinaryStream() public method

Retrieves the stream for a binary value.
public getBinaryStream ( string $path ) : resource
$path string The absolute path to the stream
return resource

getCachedDescendants() public method

It makes no difference whether or not the node itself is cached. Note that this method will also return deleted node objects so you can use them in refresh operations.
public getCachedDescendants ( string $absPath, string $class = 'Node' ) : ArrayIterato\ArrayIterator
$absPath string
$class string
return ArrayIterato\ArrayIterator

getCachedNode() public method

Note that this method will also return deleted node objects so you can use them in refresh operations.
See also: Node::refresh()
public getCachedNode ( string $absPath, $class = 'Node' ) : PHPCR\NodeInterface
$absPath string the absolute path to the node to fetch from cache
return PHPCR\NodeInterface or null

getCachedNodeByUuid() public method

As getCachedNode but looking up the node by uuid. Note that this will never return you a removed node because the uuid is removed from the map.
See also: getCachedNode
public getCachedNodeByUuid ( $uuid, string $class = 'Node' ) : PHPCR\NodeInterface
$uuid
$class string
return PHPCR\NodeInterface or null

getFetchPath() protected method

Resolve the path through all pending operations and sanity check while doing this.
protected getFetchPath ( string $absPath, string $class ) : string
$absPath string The absolute path of the node to fetch.
$class string The class of node to get. TODO: Is it sane to fetch data separately for Version and normal Node?
return string fetch path

getNode() public method

If you have an absolute path use {@link getNodeByPath()} for better performance.
See also: Session::getNode()
public getNode ( string $relPath, string $context, string $class = 'Node' ) : PHPCR\NodeInterface
$relPath string relative path
$context string context path
$class string optional class name for the factory
return PHPCR\NodeInterface The specified Node. if not available, ItemNotFoundException is thrown

getNodeByIdentifier() public method

Get the node identified by an uuid.
See also: Session::getNodeByIdentifier()
public getNodeByIdentifier ( string $identifier, string $class = 'Node' ) : PHPCR\NodeInterface
$identifier string uuid
$class string optional class name for factory
return PHPCR\NodeInterface The specified Node. if not available, ItemNotFoundException is thrown

getNodeByPath() public method

To prevent unnecessary work to be done a cache is filled to only fetch nodes once. To reset a node with the data from the backend, use Node::refresh() Uses the factory to create a Node object.
See also: Session::getNode()
public getNodeByPath ( string $absPath, string $class = 'Node', object $object = null ) : PHPCR\NodeInterface
$absPath string The absolute path of the node to fetch.
$class string The class of node to get. TODO: Is it sane to fetch data separately for Version and normal Node?
$object object A (prefetched) object (de-serialized json) from the backend only to be used if we get child nodes in one backend call
return PHPCR\NodeInterface

getNodePath() protected method

Get the node path for a property, and the property name
protected getNodePath ( string $absPath ) : array
$absPath string
return array with name, node path

getNodeType() public method

Get a single nodetype.
See also: getNodeTypes()
public getNodeType ( string $nodeType ) : DOMDocument
$nodeType string the name of nodetype to get from the transport
return DOMDocument containing the nodetype information

getNodeTypes() public method

This is only a proxy to the transport
public getNodeTypes ( array $nodeTypes = [] ) : array | DOMDocument
$nodeTypes array Empty for all or specify node types by name
return array | DOMDocument containing the nodetype information

getNodesByIdentifier() public method

Note UUIDs that are not found will be ignored. Also, duplicate IDs will be eliminated by nature of using the IDs as keys.
See also: Session::getNodesByIdentifier()
public getNodesByIdentifier ( array $identifiers, string $class = 'Node' ) : ArrayIterato\ArrayIterator | Node[]
$identifiers array UUIDs of nodes to retrieve.
$class string Optional class name for the factory.
return ArrayIterato\ArrayIterator | Node[] Iterator of the specified nodes keyed by their unique ids

getNodesByPath() public method

Note paths that cannot be found will be ignored and missing from the result. Uses the factory to create Node objects.
See also: Session::getNodes()
public getNodesByPath ( array $absPaths, string $class = 'Node', array | null $typeFilter = null ) : Node[]
$absPaths array Array containing the absolute paths of the nodes to fetch.
$class string The class of node to get. TODO: Is it sane to fetch data separately for Version and normal Node?
$typeFilter array | null Node type list to skip some nodes
return Node[] Iterator that contains all found NodeInterface instances keyed by their path

getNodesByPathAsArray() public method

public getNodesByPathAsArray ( $paths, $class = 'Node', $typeFilter = null )

getPermissions() public method

Permission can be of 4 types: - add_node - read - remove - set_property This function will return an array containing zero, one or more of the above strings.
public getPermissions ( string $absPath ) : array
$absPath string absolute path to node to get permissions for it
return array of string

getPropertiesByPath() public method

Get all nodes of those properties in one batch, then collect the properties of them.
public getPropertiesByPath ( $absPaths ) : ArrayIterato\ArrayIterator
$absPaths
return ArrayIterato\ArrayIterator that contains all found PropertyInterface instances keyed by their path

getPropertyByPath() public method

Uses the factory to instantiate a Property. Currently Jackalope just loads the containing node and then returns the requested property of the node instance.
public getPropertyByPath ( string $absPath ) : PHPCR\PropertyInterface
$absPath string The absolute path of the property to create.
return PHPCR\PropertyInterface

getReferences() public method

Returns all accessible REFERENCE properties in the workspace that point to the node
See also: Node::getReferences()
public getReferences ( string $path, string $name = null ) : ArrayIterato\ArrayIterator
$path string the path of the referenced node
$name string name of referring REFERENCE properties to be returned; if null then all referring REFERENCEs are returned
return ArrayIterato\ArrayIterator

getTransport() public method

Implementation specific: Transport is used elsewhere, provide it here for Session
public getTransport ( ) : Jackalope\Transport\TransportInterface
return Jackalope\Transport\TransportInterface

getWeakReferences() public method

Returns all accessible WEAKREFERENCE properties in the workspace that point to the node
See also: Node::getWeakReferences()
public getWeakReferences ( string $path, string $name = null ) : ArrayIterato\ArrayIterator
$path string the path of the referenced node
$name string name of referring WEAKREFERENCE properties to be returned; if null then all referring WEAKREFERENCEs are returned
return ArrayIterato\ArrayIterator

hasPendingChanges() public method

Determine if any object is modified and not saved to storage.
See also: Session::hasPendingChanges()
public hasPendingChanges ( ) : boolean
return boolean true if this session has any pending changes.

isNodeDeleted() public method

This is a simplistic check to be used by the Node to determine if it should not show one of the children the backend told it would exist.
See also: Node::__construct
public isNodeDeleted ( string $absPath ) : boolean
$absPath string The absolute path of the node
return boolean true if the current changed state has no node at this place

isNodeMoved() public method

This is a simplistic check to be used by the Node to determine if it should not show one of the children the backend told it would exist.
See also: Node::__construct
public isNodeMoved ( string $absPath ) : boolean
$absPath string The absolute path of the node
return boolean true if the node has an unsaved move operation, false otherwise

moveNode() public method

WRITE: move node from source path to destination path
See also: Session::move()
public moveNode ( string $srcAbsPath, string $destAbsPath )
$srcAbsPath string Absolute path to the source node.
$destAbsPath string Absolute path to the destination where the node shall be moved to.

moveNodeImmediately() public method

Implement the workspace move method. It is dispatched to transport immediately.
See also: Workspace::move()
public moveNodeImmediately ( string $srcAbsPath, string $destAbsPath )
$srcAbsPath string the path of the node to be moved.
$destAbsPath string the location to which the node at srcAbsPath is to be moved.

notifyItems() protected method

Notifies the given node and all of its children and properties that a transaction has begun, was committed or rolled back so that the item has a chance to save or restore his internal state.
protected notifyItems ( string $method )
$method string The method to call on each item for the notification (must be beginTransaction, commitTransaction or rollbackTransaction)

pathArrayToPropertiesIterator() protected method

Transform an array containing properties paths to an ArrayIterator over Property objects
protected pathArrayToPropertiesIterator ( array $propertyPaths ) : ArrayIterato\ArrayIterator
$propertyPaths array an array of properties paths
return ArrayIterato\ArrayIterator

performNodeRemove() protected method

Remove the item at absPath from local cache and keep information for undo.
See also: ObjectManager::removeItem()
protected performNodeRemove ( string $absPath, PHPCR\NodeInterface $node, boolean $sessionOperation = true, $cascading = false )
$absPath string The absolute path of the item that is being removed. Note that contrary to removeItem(), this path is the full path for a property too.
$node PHPCR\NodeInterface The item that is being removed
$sessionOperation boolean whether the node removal should be dispatched immediately or needs to be scheduled in the operations log

performPropertyRemove() protected method

Remove the item at absPath from local cache and keep information for undo.
See also: ObjectManager::removeItem()
protected performPropertyRemove ( string $absPath, PHPCR\PropertyInterface $property, boolean $sessionOperation = true )
$absPath string The absolute path of the item that is being removed. Note that contrary to removeItem(), this path is the full path for a property too.
$property PHPCR\PropertyInterface The item that is being removed
$sessionOperation boolean whether the property removal should be dispatched immediately or needs to be scheduled in the operations log

purgeDisappearedNode() public method

This is used by Node::refresh() to let the object manager notify deleted nodes or detect cases when not to delete.
public purgeDisappearedNode ( string $absPath, boolean $keepChanges ) : boolean
$absPath string The absolute path of the item
$keepChanges boolean Whether to keep local changes or forget them
return boolean true if the node is to be forgotten by its parent (deleted or moved away), false if child should be kept

refresh() public method

Refresh cached items from the backend.
See also: Session::refresh()
public refresh ( boolean $keepChanges )
$keepChanges boolean whether to keep local changes or discard them.

registerNodeTypes() public method

This is only a proxy to the transport
public registerNodeTypes ( array $types, boolean $allowUpdate ) : boolean
$types array an array of NodeTypeDefinitions
$allowUpdate boolean whether to fail if node already exists or to update it
return boolean true on success

registerNodeTypesCnd() public method

This is only a proxy to the transport
See also: NodeTypeManagerInterface::registerNodeTypesCnd
public registerNodeTypesCnd ( string $cnd, boolean $allowUpdate ) : boolean | Iterator
$cnd string a string with cnd information
$allowUpdate boolean whether to fail if node already exists or to update it
return boolean | Iterator true on success or \Iterator over the registered node types if repository is not able to process CND directly

removeItem() public method

If this is a node, sets all cached items below this node to deleted as well. If property is set, the path denotes the node containing the property, otherwise the node at path is removed.
See also: Item::remove()
public removeItem ( string $absPath, PHPCR\PropertyInterface $property = null )
$absPath string The absolute path to the node to be removed, including the node name.
$property PHPCR\PropertyInterface optional, property instance to delete from the given node path. If set, absPath is the path to the node containing this property.

removeItemImmediately() public method

Implement the workspace removeItem method.
See also: Workspace::removeItem
public removeItemImmediately ( string $absPath )
$absPath string the absolute path of the item to be removed

removeVersion() public method

Remove a version given the path to the version node and the version name.
public removeVersion ( string $versionPath, string $versionName )
$versionPath string The path to the version node
$versionName string The name of the version to remove

removeVersionLabel() public method

See also: VersioningInterface::addVersionLabel
public removeVersionLabel ( $path, $label )

restore() public method

Clears the node's cache after it has been restored. TODO: This is incomplete. Needs batch processing to implement restoring an array of versions
public restore ( boolean $removeExisting, string $versionPath, string $nodePath )
$removeExisting boolean whether to remove the existing current version or create a new version after that version
$versionPath string
$nodePath string absolute path to the node

rewriteItemPaths() protected method

This applies both to the cache and to the items themselves so they return the correct value on getPath calls.
protected rewriteItemPaths ( string $curPath, string $newPath )
$curPath string Absolute path of the node to rewrite
$newPath string The new absolute path

rollbackTransaction() public method

TODO: Make sure AccessDeniedException is thrown by the transport if corresponding problems occur TODO: restore the in-memory state as it would be if save() was never called during the transaction. The save() method will need to track some undo information for this to be possible.
public rollbackTransaction ( )

save() public method

The order is important to avoid conflicts 1. operationsLog 2. commit any other changes If transactions are enabled but we are not currently inside a transaction, the session is responsible to start a transaction to make sure the backend state does not get messed up in case of error.
public save ( )

Property Details

$factory protected_oe property

The factory to instantiate objects
protected FactoryInterface,jackalope $factory
return jackalope\FactoryInterface

$nodesAdd protected_oe property

Keys are the full paths to be added
protected AddNodeOperation[],Jackalope\Transport $nodesAdd
return Jackalope\Transport\AddNodeOperation[]

$nodesMove protected_oe property

Keys are the source paths, values the move operations containing the target path. The objectsByPath array is updated immediately and any getItem and similar requests are rewritten for the transport layer until save() Only nodes can be moved, not properties. Note: Keep in mind that moving also affects all children of the moved node, but we only have the explicitly moved paths in this array. We check on moved parents whenever retrieving a non-cached node.
protected MoveNodeOperation[],Jackalope\Transport $nodesMove
return Jackalope\Transport\MoveNodeOperation[]

$nodesRemove protected_oe property

Keys are the full paths to be removed. Note: Keep in mind that a delete is recursive, but we only have the explicitly deleted paths in this array. We check on deleted parents whenever retrieving a non-cached node.
protected RemoveNodeOperation[],Jackalope\Transport $nodesRemove
return Jackalope\Transport\RemoveNodeOperation[]

$objectsByPath protected_oe property

There is no notion of order here. The order is defined by order in the Node::nodes array.
protected array $objectsByPath
return array

$objectsByUuid protected_oe property

Take care never to put a path in here unless there is a node for that path in objectsByPath.
protected array $objectsByUuid
return array

$operationsLog protected_oe property

Add, remove and move actions need to be saved in the correct order to avoid i.e. adding something where a node has not yet been moved to.
protected Operation[],Jackalope\Transport $operationsLog
return Jackalope\Transport\Operation[]

$propertiesRemove protected_oe property

Keys are the full paths of properties to be removed.
protected RemovePropertyOperation[],Jackalope\Transport $propertiesRemove
return Jackalope\Transport\RemovePropertyOperation[]

$session protected_oe property

protected SessionInterface,PHPCR $session
return PHPCR\SessionInterface

$transport protected_oe property

protected TransportInterface,Jackalope\Transport $transport
return Jackalope\Transport\TransportInterface