1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
pregmatchrule.php
См. документацию.
1<?php
2
3namespace Bitrix\Main\Security\W\Rules;
4
5use Bitrix\Main\Text\StringHelper;
6use Bitrix\Main\Security\W\Rules\Results\CheckResult;
7
9{
10 protected $action;
11
13 {
14 parent::__construct($path, $context, $keys, $process, $encoding, $pattern);
15
16 $this->action = $action;
17 }
18
19 public function evaluate($value)
20 {
21 $failure = !StringHelper::isStringable($value) || preg_match($this->pattern, $value);
22
23 if ($failure)
24 {
25 return new CheckResult(
26 false,
27 $this->action
28 );
29 }
30
31 return true;
32 }
33
37 public function getAction()
38 {
39 return $this->action;
40 }
41}
__construct($path, $context, $keys, $process, $encoding, $pattern, $action)
Определения pregmatchrule.php:12