Example #1
0
 /**
  * {@inheritdoc}
  */
 public function removeNode(NodeInterface $node)
 {
     if ($node->getGraph() === $this) {
         $node->removeFromGraph();
     }
     $id = $node->getId();
     if (!$node->isBlankNode()) {
         $id = (string) $this->resolveIri($id);
     }
     unset($this->nodes[$id]);
     return $this;
 }
Example #2
0
 /**
  * Remove a reverse property.
  *
  * @param string        $property The name of the property.
  * @param NodeInterface $node     The node which has a property pointing
  *                                to this node instance.
  */
 protected function removeReverseProperty($property, NodeInterface $node)
 {
     unset($this->revProperties[$property][$node->getId()]);
     if (0 === count($this->revProperties[$property])) {
         unset($this->revProperties[$property]);
     }
 }