LdapTools\Query\Operator\bNot::isOperatorAllowed PHP Method

isOperatorAllowed() protected method

The 'Not' operator has a few specific requirements. Check these here.
protected isOperatorAllowed ( BaseOperator $operator )
$operator BaseOperator
    protected function isOperatorAllowed(BaseOperator $operator)
    {
        if (!empty($this->children)) {
            throw new \RuntimeException('The "Not" operator can only have 1 child operator.');
        }
        if ($operator instanceof ContainsOperatorsInterface) {
            throw new LdapQueryException('Cannot add an operator to bNot that can contain other operators.');
        }
    }