uawdijnntqw1x1x1
IP : 3.144.10.140
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
samara.axolotls.ru
/
bitrix
/
modules
/
tasks
/
lib
/
util
/
filter.php
/
/
<? /** * @access private * @internal */ namespace Bitrix\Tasks\Util; final class Filter { private $conditions = null; const EQUALITY_LIKE = 1; const EQUALITY_STRICT = 2; const EQUALITY_REGEXP = 3; public function __construct($conditions) { $this->conditions = static::parseConditions($conditions); } public function match($item) { if(!is_object($item) && !is_array($item)) { return false; // filter can not be applied to the basic data type, only array and arrayaccess supported } foreach($this->conditions as $condition) { $field = $condition['F']; $equality = $condition['E']; $match = false; // item does not match the unknown condition if($equality == static::EQUALITY_STRICT || $equality == static::EQUALITY_LIKE) { $match = $item[$field] == $condition['V']; } elseif($equality == static::EQUALITY_REGEXP) { $match = preg_match($condition['V'], $item[$field]); } if($condition['I']) { $match = !$match; } return $match; } return false; } public static function isA($object) { return is_a($object, get_called_class()); } private static function parseConditions($conditions) { $parsed = array(); // todo: only one level supported currently // todo: use parseFilter here like this: /* \Bitrix\Tasks\Internals\DataBase\Helper\Common::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; } }
/var/www/axolotl/data/www/samara.axolotls.ru/bitrix/modules/tasks/lib/util/filter.php