Lines Matching defs:pattern
26 /* @var array $pattern User filter pattern */
27 protected $pattern;
400 * @param array $filter array of field/pattern pairs, null for no filter
486 foreach ($this->pattern as $item => $pattern) {
488 if (!preg_match($pattern, $user)) return false;
490 if (!count(preg_grep($pattern, $info['grps']))) return false;
491 } elseif (!preg_match($pattern, $info[$item])) {
499 * Set the filter pattern
508 $this->pattern = [];
509 foreach ($filter as $item => $pattern) {
510 $this->pattern[$item] = '/' . str_replace('/', '\/', $pattern) . '/i'; // allow regex characters