silverstripe-framework/search/filters/PartialMatchFilter.php

15 lines
256 B
PHP
Raw Normal View History

<?php
/**
* Matches textual content with a LIKE '%keyword%' construct.
*
* @package sapphire
* @subpackage search
*/
class PartialMatchFilter extends SearchFilter {
public function apply($value) {
return "{$this->name} LIKE '%$value%'";
}
}
?>