Abstract Class Yiisoft\Data\Cycle\Reader\FilterHandler\LikeHandler\BaseLikeHandler
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $escapingReplacements | array | Yiisoft\ |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getAsWhereArguments() | Yiisoft\ |
|
| getFilterClass() | Yiisoft\ |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| prepareValue() | Yiisoft\ |
Property Details
Method Details
| public abstract array getAsWhereArguments ( \ | ||
| $filter | \ |
|
| $handlers | array | |
public function getAsWhereArguments(FilterInterface $filter, array $handlers): array;
| protected string prepareValue ( string|\ | ||
| $value | string|\ |
|
| $mode | \ |
|
protected function prepareValue(string|Stringable $value, LikeMode $mode): string
{
$value = strtr((string) $value, $this->escapingReplacements);
return match ($mode) {
LikeMode::Contains => '%' . $value . '%',
LikeMode::StartsWith => $value . '%',
LikeMode::EndsWith => '%' . $value,
};
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.