diff --git a/src/Processor/FilterProcessor.php b/src/Processor/FilterProcessor.php index 25eb147..6de82f0 100644 --- a/src/Processor/FilterProcessor.php +++ b/src/Processor/FilterProcessor.php @@ -19,6 +19,16 @@ public function process($src, OperationInterface $operation) $value = $operation->getValue(); $operator = $operation->getOperator(); $field = $operation->getField(); + if($operator == FilterOperation::STR_STARTS_WITH){ + $operator = FilterOperation::OPERATOR_LIKE; + $value = $value."%"; + }else if($operator == FilterOperation::STR_ENDS_WITH){ + $operator = FilterOperation::OPERATOR_LIKE; + $value = "%".$value; + }else if($operator == FilterOperation::STR_CONTAINS){ + $operator = FilterOperation::OPERATOR_LIKE; + $value = "%".$value."%"; + } $src->where($field, $operator, $value); return $src; }