|
@@ 295-305 (lines=11) @@
|
| 292 |
|
$operand = $conditionArray[3]; |
| 293 |
|
if ($namedConditionArray['operator'] === 'REQ') { |
| 294 |
|
$operand = strtolower($operand); |
| 295 |
|
if ($operand === 'true') { |
| 296 |
|
$namedConditionArray['operand'] = true; |
| 297 |
|
} elseif ($operand === 'false') { |
| 298 |
|
$namedConditionArray['operand'] = false; |
| 299 |
|
} else { |
| 300 |
|
throw new \RuntimeException( |
| 301 |
|
'Field condition "' . $conditionString . '" must have "true" or "false" as fourth part.' |
| 302 |
|
. ' Example: "FIELD:myField:REQ:true', |
| 303 |
|
1481401892 |
| 304 |
|
); |
| 305 |
|
} |
| 306 |
|
} elseif (in_array($namedConditionArray['operator'], [ '>', '<', '>=', '<=', 'BIT', '!BIT' ])) { |
| 307 |
|
if (!MathUtility::canBeInterpretedAsInteger($operand)) { |
| 308 |
|
throw new \RuntimeException( |
|
@@ 350-359 (lines=10) @@
|
| 347 |
|
); |
| 348 |
|
} |
| 349 |
|
$operand = strtolower($conditionArray[2]); |
| 350 |
|
if ($operand === 'true') { |
| 351 |
|
$namedConditionArray['isNew'] = true; |
| 352 |
|
} elseif ($operand === 'false') { |
| 353 |
|
$namedConditionArray['isNew'] = false; |
| 354 |
|
} else { |
| 355 |
|
throw new \RuntimeException( |
| 356 |
|
'Record condition "' . $conditionString . '" must have an operand "true" or "false, example "REC:NEW:true", given: ' . $operand, |
| 357 |
|
1481385173 |
| 358 |
|
); |
| 359 |
|
} |
| 360 |
|
// Programming error: There must be a uid available, other data providers should have taken care of that already |
| 361 |
|
if (!array_key_exists('uid', $databaseRow)) { |
| 362 |
|
throw new \RuntimeException( |
|
@@ 384-393 (lines=10) @@
|
| 381 |
|
); |
| 382 |
|
} |
| 383 |
|
$operand = strtolower($conditionArray[2]); |
| 384 |
|
if ($operand === 'true') { |
| 385 |
|
$namedConditionArray['isVersion'] = true; |
| 386 |
|
} elseif ($operand === 'false') { |
| 387 |
|
$namedConditionArray['isVersion'] = false; |
| 388 |
|
} else { |
| 389 |
|
throw new \RuntimeException( |
| 390 |
|
'Version condition "' . $conditionString . '" must have a "true" or "false" operand, example "VERSION:IS:true", given: ' . $operand, |
| 391 |
|
1481384123 |
| 392 |
|
); |
| 393 |
|
} |
| 394 |
|
// Programming error: There must be a uid available, other data providers should have taken care of that already |
| 395 |
|
if (!array_key_exists('uid', $databaseRow)) { |
| 396 |
|
throw new \RuntimeException( |