framework/data/DataFilter.php
protected function detectSearchAttributeType(Validator $validator)
    {
        if ($validator instanceof BooleanValidator) {
            return self::TYPE_BOOLEAN;
        }
        
        if ($validator instanceof NumberValidator) {
            return $validator->integerOnly ? self::TYPE_INTEGER : self::TYPE_FLOAT;
        }
        
        if ($validator instanceof StringValidator) {
            return self::TYPE_STRING;
        }
        
        if ($validator instanceof EachValidator) {
            return self::TYPE_ARRAY;
        }
        
        if ($validator instanceof DateValidator) {
            if ($validator->type == DateValidator::TYPE_DATETIME) {
                return self::TYPE_DATETIME;
            }
            
            if ($validator->type == DateValidator::TYPE_TIME) {
                return self::TYPE_TIME;
            }
            return self::TYPE_DATE;
        }
    }
protected function detectSearchAttributeType(Validator $validator)
    {
        if ($validator instanceof BooleanValidator) {
            return self::TYPE_BOOLEAN;
        }
        
        if ($validator instanceof NumberValidator) {
            return $validator->integerOnly ? self::TYPE_INTEGER : self::TYPE_FLOAT;
        }
        
        if ($validator instanceof StringValidator) {
            return self::TYPE_STRING;
        }
        
        if ($validator instanceof EachValidator) {
            return self::TYPE_ARRAY;
        }
        
        if ($validator instanceof DateValidator) {
            if ($validator->type == DateValidator::TYPE_DATETIME) {
                return self::TYPE_DATETIME;
            }
            
            if ($validator->type == DateValidator::TYPE_TIME) {
                return self::TYPE_TIME;
            }
            return self::TYPE_DATE;
        }
    }
Detect attribute type from given validator.

@param Validator validator from which to detect attribute type.
@return string|null detected attribute type.
@since 2.0.14