mirror of
https://github.com/wallabag/wallabag.git
synced 2024-06-02 21:39:21 +00:00
16 lines
323 B
PHP
16 lines
323 B
PHP
<?php
|
|
|
|
namespace Wallabag\CoreBundle\Operator\Doctrine;
|
|
|
|
class Matches
|
|
{
|
|
public function __invoke($subject, $pattern)
|
|
{
|
|
if ($pattern[0] === "'") {
|
|
$pattern = sprintf("'%%%s%%'", substr($pattern, 1, -1));
|
|
}
|
|
|
|
return sprintf('UPPER(%s) LIKE UPPER(%s)', $subject, $pattern);
|
|
}
|
|
}
|