public function multipleValueHandler($key, $value, $expr)
{
if (strpos($value, '&&') === false && strpos($value, '||') === false) {
return null;
}
$values = preg_split('/ *(&&|\\|\\|) */', $value, -1, PREG_SPLIT_DELIM_CAPTURE);
$op = $values[1];
if ($op === '&&') {
$comparison = 'andX';
} elseif ($op === '||') {
$comparison = 'orX';
}
$values = array_diff($values, ['&&', '||']);
$filterParams = [];
$parts = [];
$count = 1;
while ($val = array_shift($values)) {
$val = $this->parseValue($val);
$placeholder = $key . '_' . $count;
$filterParams[$placeholder] = $val['value'];
$exprMethod = $val['operator'];
$parts[] = $this->expr->{$exprMethod}($this->alias . $key, ':' . $placeholder);
$count++;
}
$filter = new Filter();
$filter->setKey($key);
$filter->setExpression(call_user_func_array([$expr, $comparison], $parts));
$filter->setParameters($filterParams);
return $filter;
}