silverstripe-framework/search/filters/EndsWithFilter.php

25 lines
429 B
PHP
Raw Normal View History

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