1 | <?php |
||
15 | class LikeConditionBuilder extends \yii\db\conditions\LikeConditionBuilder |
||
16 | { |
||
17 | /** |
||
18 | * @inheritdoc |
||
19 | */ |
||
20 | protected $escapeCharacter = '!'; |
||
21 | /** |
||
22 | * `\` is initialized in [[buildLikeCondition()]] method since |
||
23 | * we need to choose replacement value based on [[\yii\db\Schema::quoteValue()]]. |
||
24 | * @inheritdoc |
||
25 | */ |
||
26 | protected $escapingReplacements = [ |
||
27 | '%' => '!%', |
||
28 | '_' => '!_', |
||
29 | '!' => '!!', |
||
30 | ]; |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function build(ExpressionInterface $expression, array &$params = []) |
||
47 | } |
||
48 |