silverstripe-framework/search/filters/WithinRangeFilter.php
Ingo Schommer 46bbde18e7 (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60261 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-10 23:03:35 +00:00

34 lines
480 B
PHP

<?php
/**
* @package sapphire
* @subpackage search
*/
/**
* Incomplete.
*
* @todo add to tests
*
* @package sapphire
* @subpackage search
*/
class WithinRangeFilter extends SearchFilter {
private $min;
private $max;
function setMin($min) {
$this->min = $min;
}
function setMax($max) {
$this->max = $max;
}
function apply(SQLQuery $query) {
$query->where("{$this->getDbName()} >= {$this->min} AND {$this->getDbName()} <= {$this->max}");
}
}
?>