silverstripe-framework/ORM/Filters/StartsWithFilter.php

20 lines
350 B
PHP
Raw Normal View History

<?php
namespace SilverStripe\ORM\Filters;
/**
* Matches textual content with a substring match from the beginning
* of the string.
2014-08-15 08:53:05 +02:00
*
* <code>
* "abcdefg" => "defg" # false
* "abcdefg" => "abcd" # true
* </code>
*/
class StartsWithFilter extends PartialMatchFilter {
protected function getMatchPattern($value) {
return "$value%";
}
}