Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
filter.php
1<?php
2
4
6{
10 private $operator = 'IN';
11
15 private $category = 'computed';
16
20 private $key;
21
25 private $value;
26
30 public function getOperator(): string
31 {
32 return $this->operator;
33 }
34
40 public function setOperator(string $operator): Filter
41 {
42 $this->operator = $operator;
43
44 return $this;
45 }
46
50 public function getCategory(): string
51 {
52 return $this->category;
53 }
54
60 public function setCategory(string $category): Filter
61 {
62 $this->category = $category;
63
64 return $this;
65 }
66
70 public function getKey(): string
71 {
72 return $this->key;
73 }
74
80 public function setKey(string $key): Filter
81 {
82 $this->key = $key;
83
84 return $this;
85 }
86
90 public function getValue(): string
91 {
92 return $this->value;
93 }
94
100 public function setValue(string $value): Filter
101 {
102 $this->value = $value;
103
104 return $this;
105 }
106
107 public function ableFilters()
108 {
109 return [
110 'region_by_ip',
111 'region_by_phone'
112 ];
113 }
114
115 public function toArray(): array
116 {
117 return [
118 'operator' => $this->operator,
119 'category' => $this->category,
120 'key' => $this->key,
121 'value' => $this->value
122 ];
123 }
124}