]>
Commit | Line | Data |
---|---|---|
a6e27f74 KG |
1 | <?php |
2 | ||
3 | namespace Wallabag\CoreBundle\Operator\Doctrine; | |
4 | ||
5 | class Matches | |
6 | { | |
7 | public function __invoke($subject, $pattern) | |
8 | { | |
9 | if ($pattern[0] === "'") { | |
10 | $pattern = sprintf("'%%%s%%'", substr($pattern, 1, -1)); | |
11 | } | |
12 | ||
13 | return sprintf('UPPER(%s) LIKE UPPER(%s)', $subject, $pattern); | |
14 | } | |
15 | } |