1 | <?php |
||
23 | class QueryBuilderValidation implements QueryBuilderValidationInterface { |
||
24 | |||
25 | /** |
||
26 | * Allow empty value. |
||
27 | * |
||
28 | * @var bool|null |
||
29 | */ |
||
30 | private $allowEmptyValue; |
||
31 | |||
32 | /** |
||
33 | * Callback. |
||
34 | * |
||
35 | * @var string|null |
||
36 | */ |
||
37 | private $callback; |
||
38 | |||
39 | /** |
||
40 | * Format. |
||
41 | * |
||
42 | * @var mixed |
||
43 | */ |
||
44 | private $format; |
||
45 | |||
46 | /** |
||
47 | * Max. |
||
48 | * |
||
49 | * @var mixed |
||
50 | */ |
||
51 | private $max; |
||
52 | |||
53 | /** |
||
54 | * Messages. |
||
55 | * |
||
56 | * @var array|null |
||
57 | */ |
||
58 | private $messages; |
||
59 | |||
60 | /** |
||
61 | * Min. |
||
62 | * |
||
63 | * @var mixed |
||
64 | */ |
||
65 | private $min; |
||
66 | |||
67 | /** |
||
68 | * Step. |
||
69 | * |
||
70 | * @var mixed |
||
71 | */ |
||
72 | private $step; |
||
73 | |||
74 | /** |
||
75 | * Constructor. |
||
76 | */ |
||
77 | public function __construct() { |
||
80 | |||
81 | /** |
||
82 | * {@inheritDoc} |
||
83 | */ |
||
84 | public function getAllowEmptyValue(): ?bool { |
||
87 | |||
88 | /** |
||
89 | * {@inheritDoc} |
||
90 | */ |
||
91 | public function getCallback(): ?string { |
||
94 | |||
95 | /** |
||
96 | * {@inheritDoc} |
||
97 | */ |
||
98 | public function getFormat() { |
||
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | public function getMax() { |
||
108 | |||
109 | /** |
||
110 | * {@inheritDoc} |
||
111 | */ |
||
112 | public function getMessages(): ?array { |
||
115 | |||
116 | /** |
||
117 | * {@inheritDoc} |
||
118 | */ |
||
119 | public function getMin() { |
||
122 | |||
123 | /** |
||
124 | * {@inheritDoc} |
||
125 | */ |
||
126 | public function getStep() { |
||
129 | |||
130 | /** |
||
131 | * {@inheritDoc} |
||
132 | */ |
||
133 | public function jsonSerialize(): array { |
||
136 | |||
137 | /** |
||
138 | * Set the allow empty value. |
||
139 | * |
||
140 | * @param bool|null $allowEmptyValue The allow empty value. |
||
141 | * @return QueryBuilderValidationInterface Returns this validation. |
||
142 | */ |
||
143 | public function setAllowEmptyValue(?bool $allowEmptyValue): QueryBuilderValidationInterface { |
||
147 | |||
148 | /** |
||
149 | * Set the callback. |
||
150 | * |
||
151 | * @param string|null $callback The callback. |
||
152 | * @return QueryBuilderValidationInterface Returns this validation. |
||
153 | */ |
||
154 | public function setCallback(?string $callback): QueryBuilderValidationInterface { |
||
158 | |||
159 | /** |
||
160 | * Set the format. |
||
161 | * |
||
162 | * @param mixed $format The format. |
||
163 | * @return QueryBuilderValidationInterface Returns this validation. |
||
164 | */ |
||
165 | public function setFormat($format): QueryBuilderValidationInterface { |
||
169 | |||
170 | /** |
||
171 | * Set the max. |
||
172 | * |
||
173 | * @param mixed $max The max. |
||
174 | * @return QueryBuilderValidationInterface Returns this validation. |
||
175 | */ |
||
176 | public function setMax($max): QueryBuilderValidationInterface { |
||
180 | |||
181 | /** |
||
182 | * Set the messages. |
||
183 | * |
||
184 | * @param array|null $messages The messages. |
||
185 | * @return QueryBuilderValidationInterface Returns this validation. |
||
186 | */ |
||
187 | public function setMessages(?array $messages): QueryBuilderValidationInterface { |
||
191 | |||
192 | /** |
||
193 | * Set the min. |
||
194 | * |
||
195 | * @param mixed $min The min. |
||
196 | * @return QueryBuilderValidationInterface Returns this validation. |
||
197 | */ |
||
198 | public function setMin($min): QueryBuilderValidationInterface { |
||
202 | |||
203 | /** |
||
204 | * Set the step. |
||
205 | * |
||
206 | * @param mixed $step The step. |
||
207 | * @return QueryBuilderValidationInterface Returns this validation. |
||
208 | */ |
||
209 | public function setStep($step): QueryBuilderValidationInterface { |
||
213 | } |
||
214 |