コード例 #1
0
ファイル: nested.php プロジェクト: chaudhary4k4/modernstore
 /**
  * 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;
 }
コード例 #2
0
ファイル: nested.php プロジェクト: AxelFG/ckbran-inf
 /**
  * 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;
 }