2008-08-06 05:28:25 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Matches textual content with a columnname = 'keyword' construct
|
|
|
|
*
|
|
|
|
* @todo case sensitivity switch
|
|
|
|
* @todo documentation
|
|
|
|
*
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage search
|
|
|
|
*/
|
2008-08-09 05:54:55 +02:00
|
|
|
class ExactMatchFilter extends SearchFilter {
|
2008-08-06 05:28:25 +02:00
|
|
|
|
2008-08-09 06:06:52 +02:00
|
|
|
/**
|
|
|
|
* Applies an exact match (equals) on a field value.
|
|
|
|
*
|
|
|
|
* @return unknown
|
|
|
|
*/
|
2008-08-09 06:38:44 +02:00
|
|
|
public function apply(SQLQuery $query) {
|
2008-08-09 06:53:34 +02:00
|
|
|
$query = $this->applyRelation($query);
|
|
|
|
return $query->where("{$this->getName()} = '{$this->value}'");
|
2008-08-09 06:06:52 +02:00
|
|
|
}
|
|
|
|
|
2008-08-06 05:28:25 +02:00
|
|
|
}
|
|
|
|
?>
|