mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-13 13:06:32 +02:00
46bbde18e7
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60261 467b73ca-7a2a-4603-9d3b-597d59a354a9
34 lines
480 B
PHP
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}");
|
|
}
|
|
|
|
}
|
|
|
|
?>
|