Remove deprecated PartialMatchFilter, use PartialMatchFilter instead

This commit is contained in:
Sean Harvey 2012-11-15 10:37:33 +13:00
parent 4c3b804fa5
commit 671881420b

View File

@ -1,44 +0,0 @@
<?php
/**
* @package framework
* @subpackage search
*/
/**
* Uses a substring match against content in column rows.
* @deprecated 3.0 Use PartialMatchFilter instead
*
* @package framework
* @subpackage search
*/
class SubstringFilter extends PartialMatchFilter {
public function __construct($fullName, $value = false, array $modifiers = array()) {
Deprecation::notice('3.0', 'PartialMatchFilter instead.');
parent::__construct($fullName, $value, $modifiers);
}
public function apply(DataQuery $query) {
$values = $this->getValue();
$filter = new PartialMatchFilter($this->getFullName(), $values, $this->getModifiers());
return $filter->apply($query);
}
protected function applyOne(DataQuery $query) {
/* NO OP */
}
public function exclude(DataQuery $query) {
$values = $this->getValue();
$filter = new PartialMatchFilter($this->getFullName(), $values, $this->getModifiers());
return $filter->exclude($query);
}
protected function excludeOne(DataQuery $query) {
/* NO OP */
}
public function isEmpty() {
return $this->getValue() === array() || $this->getValue() === null || $this->getValue() === '';
}
}