Baum\Node::isSelfOrAncestorOf PHP Method

isSelfOrAncestorOf() public method

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