Exemplo n.º 1
0
 /**
  * Is $node this very node?
  *
  * @param F0FTableNested $node
  *
  * @return bool
  */
 public function equals(F0FTableNested &$node)
 {
     return $this->getId() == $node->getId() && $this->lft == $node->lft && $this->rgt == $node->rgt;
 }
Exemplo n.º 2
0
 /**
  * Is $node this very node?
  *
  * @param F0FTableNested $node
  *
  * @throws  RuntimeException
  *
  * @return bool
  */
 public function equals(F0FTableNested &$node)
 {
     // Sanity checks on current node position
     if ($this->lft >= $this->rgt) {
         throw new RuntimeException('Invalid position values for the current node');
     }
     if ($node->lft >= $node->rgt) {
         throw new RuntimeException('Invalid position values for the other node');
     }
     return $this->getId() == $node->getId() && $this->lft == $node->lft && $this->rgt == $node->rgt;
 }