Yii Advanced Filters Extension
  • Package
  • Class

Packages

  • advancedfilters
    • components
    • dbhelpers
    • filters

Classes

  • AfBaseFilter
  • AfDefaultFilter
  • AfExactFilter
  • AfRangeFilter
  • AfRegexFilter
  • AfSubstringFilter

Class AfRangeFilter

This filter handles numeric ranges.

If a prefix, infix or suffix string is set to an empty string, it will not be used when identifying the expression type.

CComponent
Extended by AfBaseFilter
Extended by AfRangeFilter
Package: advancedfilters\filters
Author: Keith Burton kburton@kappasoft.net
Located at filters/AfRangeFilter.php

Methods summary

protected string
# getColumnExpression( )

Overrides the parent implementation to include a cast to decimal.

Overrides the parent implementation to include a cast to decimal.

If $this->treatNonNumericTextAsZero is false, non-numeric column values will be converted to null.

Returns

string
the updated column expression.

Overrides

AfBaseFilter::getColumnExpression
public boolean
# acceptsFilterExpression( )

Determines whether the provided expression can be processed by this filter class.

Determines whether the provided expression can be processed by this filter class.

Returns

boolean
whether this class can process the expression.
public CDbCriteria
# getCriteria( )

Builds a new CDbCriteria object based on the expression provided.

Builds a new CDbCriteria object based on the expression provided.

Returns

CDbCriteria
the new criteria object.

Methods inherited from AfBaseFilter

__construct(), createFilter(), getDbConnection(), getDbHelper(), getFilterExpression(), getInvertLogic(), stripPrefixSuffixString()

Magic methods summary

Properties summary

public string $betweenPrefix

the prefix string for 'between' expressions.

the prefix string for 'between' expressions.

# ''
public string $betweenInfix

the infix string for 'between' expressions.

the infix string for 'between' expressions.

# ' to '
public string $betweenSuffix

the suffix string for 'between' expressions.

the suffix string for 'between' expressions.

# ''
public string $lessThanPrefix

the prefix string for 'less than' expressions.

the prefix string for 'less than' expressions.

# '<'
public string $lessThanSuffix

the suffix string for 'less than' expressions.

the suffix string for 'less than' expressions.

# ''
public string $lessThanEqualPrefix

the prefix string for 'less than or equal to' expressions.

the prefix string for 'less than or equal to' expressions.

# '<='
public string $lessThanEqualSuffix

the suffix string for 'less than or equal to' expressions.

the suffix string for 'less than or equal to' expressions.

# ''
public string $greaterThanPrefix

the prefix string for 'greater than' expressions.

the prefix string for 'greater than' expressions.

# '>'
public string $greaterThanSuffix

the suffix string for 'greater than' expressions.

the suffix string for 'greater than' expressions.

# ''
public string $greaterThanEqualPrefix

the prefix string for 'greater than or equal to' expressions.

the prefix string for 'greater than or equal to' expressions.

# '>='
public string $greaterThanEqualSuffix

the suffix string for 'greater than or equal to' expressions.

the suffix string for 'greater than or equal to' expressions.

# ''
public string $equalPrefix

the prefix string for 'equal to' expressions.

the prefix string for 'equal to' expressions.

# '='
public string $equalSuffix

the suffix string for 'equal to' expressions.

the suffix string for 'equal to' expressions.

# ''
public string $numberPattern

the regular expression pattern used to identify numbers in the provided filter expression.

the regular expression pattern used to identify numbers in the provided filter expression.

# '-?\\d*\\.?\\d+'
public integer $conversionNumDigits

the number of digits that will be used to represent database values once they are converted to a decimal format. Change this if your data contains values that are too large to fit in a decimal of this size.

the number of digits that will be used to represent database values once they are converted to a decimal format. Change this if your data contains values that are too large to fit in a decimal of this size.

# 20
public integer $conversionDecimalPlaces

the number of decimal places that will be used when converting database values to a decimal format. Change this if your data contains values with more decimal places. You may also need to override the $conversionNumDigits property.

the number of decimal places that will be used when converting database values to a decimal format. Change this if your data contains values with more decimal places. You may also need to override the $conversionNumDigits property.

# 4
public boolean $treatNonNumericValuesAsZero

whether columns which can't be converted to a number should be treated as having a zero value in numeric comparisons. If this is false, rows where the column is non-numeric will never be returned.

whether columns which can't be converted to a number should be treated as having a zero value in numeric comparisons. If this is false, rows where the column is non-numeric will never be returned.

# false

Properties inherited from AfBaseFilter

$active, $priority, $treatNullAsEmptyString

Yii Advanced Filters Extension API documentation generated by ApiGen