silverstripe-framework/ORM/Filters/EndsWithFilter.php

20 lines
367 B
PHP
Raw Normal View History

<?php
namespace SilverStripe\ORM\Filters;
/**
* 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>
*/
class EndsWithFilter extends PartialMatchFilter {
protected function getMatchPattern($value) {
return "%$value";
}
}