public function equals(TreeModel &$node)
{
// Sanity checks on current node position
if ($this->lft >= $this->rgt) {
throw new TreeInvalidLftRgtCurrent();
}
if ($node->lft >= $node->rgt) {
throw new TreeInvalidLftRgtOther();
}
return $this->getId() == $node->getId() && $this->lft == $node->lft && $this->rgt == $node->rgt;
}