mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-18 23:46:21 +02:00
25 lines
412 B
PHP
25 lines
412 B
PHP
<?php
|
|
/**
|
|
* @package framework
|
|
* @subpackage search
|
|
*/
|
|
|
|
/**
|
|
* Matches textual content with a substring match from the beginning
|
|
* of the string.
|
|
*
|
|
* <code>
|
|
* "abcdefg" => "defg" # false
|
|
* "abcdefg" => "abcd" # true
|
|
* </code>
|
|
*
|
|
* @package framework
|
|
* @subpackage search
|
|
*/
|
|
class StartsWithFilter extends PartialMatchFilter {
|
|
|
|
protected function getMatchPattern($value) {
|
|
return "$value%";
|
|
}
|
|
}
|