...Человеческий поиск в разработке...
- Модуль: bizproc
- Путь к файлу: ~/bitrix/modules/bizproc/classes/general/helper.php
- Класс: CBPHelper
- Вызов: CBPHelper::getFilterOperation
static function getFilterOperation($key) { $strNegative = "N"; if (mb_substr($key, 0, 1) == "!") { $key = mb_substr($key, 1); $strNegative = "Y"; } $strOrNull = "N"; if (mb_substr($key, 0, 1) == "+") { $key = mb_substr($key, 1); $strOrNull = "Y"; } if (mb_substr($key, 0, 2) == ">=") { $key = mb_substr($key, 2); $strOperation = ">="; } elseif (mb_substr($key, 0, 1) == ">") { $key = mb_substr($key, 1); $strOperation = ">"; } elseif (mb_substr($key, 0, 2) == "<=") { $key = mb_substr($key, 2); $strOperation = "<="; } elseif (mb_substr($key, 0, 1) == "<") { $key = mb_substr($key, 1); $strOperation = "<"; } elseif (mb_substr($key, 0, 1) == "@") { $key = mb_substr($key, 1); $strOperation = "="; $strNegative = 'N'; } elseif (mb_substr($key, 0, 1) == "~") { $key = mb_substr($key, 1); $strOperation = "LIKE"; } elseif (mb_substr($key, 0, 1) == "%") { $key = mb_substr($key, 1); $strOperation = "QUERY"; } else { $strOperation = "="; } return array("FIELD" => $key, "NEGATIVE" => $strNegative, "OPERATION" => $strOperation, "OR_NULL" => $strOrNull); }