1 | <?php |
||
8 | class Configuration |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $group; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $key; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $message; |
||
24 | |||
25 | /** |
||
26 | * @var string[] |
||
27 | */ |
||
28 | protected $messages; |
||
29 | |||
30 | /** |
||
31 | * @var AllOf |
||
32 | */ |
||
33 | protected $rules; |
||
34 | |||
35 | /** |
||
36 | * Constructor. |
||
37 | * |
||
38 | * @param AllOf|array $options |
||
39 | * @param string $key |
||
40 | * @param string $group |
||
41 | */ |
||
42 | public function __construct($options, $key = null, $group = null) |
||
71 | |||
72 | /** |
||
73 | * Gets the group to use for errors and values storage. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | public function getGroup() |
||
81 | |||
82 | /** |
||
83 | * Gets the key to use for errors and values storage. |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | public function getKey() |
||
91 | |||
92 | /** |
||
93 | * Gets the error message. |
||
94 | * |
||
95 | * @return string|null |
||
96 | */ |
||
97 | public function getMessage() |
||
101 | |||
102 | /** |
||
103 | * Gets individual rules messages. |
||
104 | * |
||
105 | * @return string[] |
||
106 | */ |
||
107 | public function getMessages() |
||
111 | |||
112 | /** |
||
113 | * Gets the validation rules. |
||
114 | * |
||
115 | * @return AllOf |
||
116 | */ |
||
117 | public function getValidationRules() |
||
121 | |||
122 | /** |
||
123 | * Tells whether a group has been set. |
||
124 | * |
||
125 | * @return bool |
||
126 | */ |
||
127 | public function hasGroup() |
||
131 | |||
132 | /** |
||
133 | * Tells whether a key has been set. |
||
134 | * |
||
135 | * @return bool |
||
136 | */ |
||
137 | public function hasKey() |
||
141 | |||
142 | /** |
||
143 | * Tells whether a single message has been set. |
||
144 | * |
||
145 | * @return bool |
||
146 | */ |
||
147 | public function hasMessage() |
||
151 | |||
152 | /** |
||
153 | * Tells whether individual rules messages have been set. |
||
154 | * |
||
155 | * @return bool |
||
156 | */ |
||
157 | public function hasMessages() |
||
161 | |||
162 | /** |
||
163 | * Sets the group to use for errors and values storage. |
||
164 | * |
||
165 | * @param string $group |
||
166 | */ |
||
167 | public function setGroup($group) |
||
171 | |||
172 | /** |
||
173 | * Sets the key to use for errors and values storage. |
||
174 | * |
||
175 | * @param string $key |
||
176 | */ |
||
177 | public function setKey($key) |
||
181 | |||
182 | /** |
||
183 | * Sets the error message. |
||
184 | * |
||
185 | * @param string $message |
||
186 | */ |
||
187 | public function setMessage($message) |
||
191 | |||
192 | /** |
||
193 | * Sets individual rules messages. |
||
194 | * |
||
195 | * @param string[] $messages |
||
196 | */ |
||
197 | public function setMessages(array $messages) |
||
201 | |||
202 | /** |
||
203 | * Sets the validation rules. |
||
204 | * |
||
205 | * @param AllOf $rules |
||
206 | */ |
||
207 | public function setValidationRules(AllOf $rules) |
||
211 | } |
||
212 |