- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/util/filter.php
- Класс: BitrixTasksUtilFilter
- Вызов: Filter::parseConditions
static function parseConditions($conditions)
{
$parsed = array();
// todo: only one level supported currently
// todo: use parseFilter here like this:
/*
BitrixTasksInternalsDataBaseHelperCommon::parseFilter()
*/
if(is_array($conditions))
{
foreach($conditions as $c => $v)
{
$inverse = false;
$equals = static::EQUALITY_LIKE;
$c = trim((string) $c);
// todo: make rich syntax here, currently only = and != supported
if($c[0] == '!')
{
$inverse = true;
$c = mb_substr($c, 1);
}
if($c[0] == '=')
{
$equals = static::EQUALITY_STRICT;
$c = mb_substr($c, 1);
}
elseif($c[0] == '~')
{
$equals = static::EQUALITY_REGEXP;
$c = mb_substr($c, 1);
}
if($c != '')
{
$parsed[] = array('I' => $inverse, 'E' => $equals, 'F' => $c, 'V' => $v);
}
}
}
return $parsed;
}