LdapTools\Utilities\ArrayToOperator::toOperator PHP Method

toOperator() public method

Given an array that represents different filter methods, return the operator representation of it.
public toOperator ( array $filter ) : BaseOperator
$filter array
return LdapTools\Query\Operator\BaseOperator
    public function toOperator(array $filter)
    {
        if (empty($filter)) {
            throw new InvalidArgumentException('Cannot parse an empty array to an LDAP filter operator.');
        }
        return $this->getOperatorForArray($filter);
    }