Ejemplo n.º 1
0
 /**
  * Returns true if both this node and $otherNode are root, leaf or child (same tree scope)
  *
  * @param F0FTableNested $otherNode
  *
  * @return bool
  */
 public function inSameScope(F0FTableNested $otherNode)
 {
     if ($this->isLeaf()) {
         return $otherNode->isLeaf();
     } elseif ($this->isRoot()) {
         return $otherNode->isRoot();
     } elseif ($this->isChild()) {
         return $otherNode->isChild();
     } else {
         return false;
     }
 }