コード例 #1
0
ファイル: ObjectManager.php プロジェクト: jackalope/jackalope
 /**
  * Remove the item at absPath from local cache and keep information for undo.
  *
  * @param string $absPath 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.
  * @param NodeInterface $node             The item that is being removed
  * @param bool          $sessionOperation whether the node removal should be
  *      dispatched immediately or needs to be scheduled in the operations log
  *
  * @see ObjectManager::removeItem()
  */
 protected function performNodeRemove($absPath, NodeInterface $node, $sessionOperation = true, $cascading = false)
 {
     if (!$sessionOperation && !$cascading) {
         $this->transport->deleteNodeImmediately($absPath);
     }
     unset($this->objectsByUuid[$node->getIdentifier()], $this->objectsByPath['Node'][$absPath]);
     if ($sessionOperation) {
         // keep reference to object in case of refresh
         $operation = new RemoveNodeOperation($absPath, $node);
         $this->nodesRemove[$absPath] = $operation;
         if (!$cascading) {
             $this->operationsLog[] = $operation;
         }
     }
 }