2008-08-09 06:06:52 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Matches on rows where the field is not equal to the given value.
|
|
|
|
*
|
2012-09-20 09:26:05 +02:00
|
|
|
* @deprecated 3.1 Use ExactMatchFilter:not instead
|
2012-04-12 08:02:46 +02:00
|
|
|
* @package framework
|
2009-03-22 23:59:14 +01:00
|
|
|
* @subpackage search
|
2008-08-09 06:06:52 +02:00
|
|
|
*/
|
|
|
|
class NegationFilter extends SearchFilter {
|
2012-09-20 09:26:05 +02:00
|
|
|
function __construct($fullName, $value = false, array $modifiers = array()) {
|
|
|
|
Deprecation::notice('3.1', 'Use ExactMatchFilter:not instead.');
|
|
|
|
$modifiers[] = 'not';
|
|
|
|
parent::__construct($fullName, $value, $modifiers);
|
|
|
|
}
|
2008-08-09 06:06:52 +02:00
|
|
|
|
2011-03-21 09:37:55 +01:00
|
|
|
public function apply(DataQuery $query) {
|
2012-09-20 09:26:05 +02:00
|
|
|
$filter = new ExactMatchFilter($this->getFullName(), $this->getValue(), $this->getModifiers());
|
|
|
|
return $filter->apply($query);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function applyOne(DataQuery $query) {
|
|
|
|
/* NO OP */
|
2008-08-09 06:06:52 +02:00
|
|
|
}
|
|
|
|
|
2012-09-06 09:54:44 +02:00
|
|
|
public function exclude(DataQuery $query) {
|
2012-09-20 09:26:05 +02:00
|
|
|
$filter = new ExactMatchFilter($this->getFullName(), $this->getValue(), $this->getModifiers());
|
|
|
|
return $filter->exclude($query);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function excludeOne(DataQuery $query) {
|
|
|
|
/* NO OP */
|
2012-09-06 09:54:44 +02:00
|
|
|
}
|
2008-08-09 06:06:52 +02:00
|
|
|
}
|
|
|
|
|