Baum\Node::isAncestorOf PHP Method

isAncestorOf() public method

Returns true if node is an ancestor.
public isAncestorOf ( $other ) : boolean
return boolean
    public function isAncestorOf($other)
    {
        return $this->getLeft() < $other->getLeft() && $this->getRight() > $other->getLeft() && $this->inSameScope($other);
    }