silverstripe-framework/search/filters/EndsWithFilter.php
2014-08-19 09:17:15 +12:00

25 lines
429 B
PHP

<?php
/**
* @package framework
* @subpackage search
*/
/**
* Matches textual content with a substring match on a text fragment leading
* to the end of the string.
*
* <code>
* "abcdefg" => "defg" # true
* "abcdefg" => "abcd" # false
* </code>
*
* @package framework
* @subpackage search
*/
class EndsWithFilter extends PartialMatchFilter {
protected function getMatchPattern($value) {
return "%$value";
}
}