1 | <?php |
||
18 | class ConstRangeValidator extends RangeValidator |
||
19 | { |
||
20 | /** |
||
21 | * Prefix for constants (default $attribute) will be used |
||
22 | * |
||
23 | * @var |
||
24 | */ |
||
25 | public $prefix; |
||
26 | |||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | public $strict = true; |
||
31 | |||
32 | /** |
||
33 | * @var string Class with const range (model class will be used by default) |
||
34 | */ |
||
35 | public $targetClass; |
||
36 | |||
37 | /** |
||
38 | * @var callable |
||
39 | */ |
||
40 | public $filter; |
||
41 | |||
42 | public static $ranges = []; |
||
43 | |||
44 | /** |
||
45 | * @return void |
||
46 | */ |
||
47 | public function init() |
||
52 | |||
53 | /** |
||
54 | * @return \Closure |
||
55 | */ |
||
56 | public function getClosure(): \Closure |
||
76 | |||
77 | /** |
||
78 | * @param mixed $value |
||
79 | * @return array|null |
||
80 | */ |
||
81 | protected function validateValue($value) |
||
88 | |||
89 | /** |
||
90 | * @inheritdoc |
||
91 | */ |
||
92 | public function validateAttribute($model, $attribute) |
||
97 | } |