1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace SomeWork\Minjust; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* @see \SomeWork\Minjust\Tests\Unit\FindRequestTest |
7
|
|
|
*/ |
8
|
|
|
class FindRequest |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* @var string |
12
|
|
|
*/ |
13
|
|
|
public const FULL_NAME = 'fullName'; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @var string |
17
|
|
|
*/ |
18
|
|
|
public const REGISTER_NUMBER = 'registerNumber'; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @var string |
22
|
|
|
*/ |
23
|
|
|
public const CERTIFICATE_NUMBER = 'identityCard'; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
public const STATUS = 'status'; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var string |
32
|
|
|
*/ |
33
|
|
|
public const FORM_OF_LEGAL_PRACTICE = 'orgForm'; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var string |
37
|
|
|
*/ |
38
|
|
|
public const TERRITORIAL_SUBJECT = 'regCode'; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var string |
42
|
|
|
*/ |
43
|
|
|
public const PAGE = 'page'; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
protected $fullName = ''; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
*/ |
53
|
|
|
protected $registerNumber = ''; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @var string |
57
|
|
|
*/ |
58
|
|
|
protected $certificateNumber = ''; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @var int|null |
62
|
|
|
*/ |
63
|
|
|
protected $status; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @var int|null |
67
|
|
|
*/ |
68
|
|
|
protected $formOfLegalPractice; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @var string|null |
72
|
|
|
*/ |
73
|
|
|
protected $territorialSubject; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var bool |
77
|
|
|
*/ |
78
|
|
|
protected $fullData = false; |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @var int |
82
|
|
|
*/ |
83
|
|
|
protected $page = 1; |
84
|
|
|
|
85
|
1 |
|
public function getFormData(): array |
86
|
|
|
{ |
87
|
|
|
return [ |
88
|
1 |
|
self::FULL_NAME => $this->getFullName(), |
89
|
1 |
|
self::REGISTER_NUMBER => $this->getRegisterNumber(), |
90
|
1 |
|
self::CERTIFICATE_NUMBER => $this->getCertificateNumber(), |
91
|
1 |
|
self::STATUS => $this->getStatus(), |
92
|
1 |
|
self::FORM_OF_LEGAL_PRACTICE => $this->getFormOfLegalPractice(), |
93
|
1 |
|
self::TERRITORIAL_SUBJECT => $this->getTerritorialSubject(), |
94
|
1 |
|
self::PAGE => $this->getPage() - 1, |
95
|
|
|
]; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return string |
100
|
|
|
*/ |
101
|
2 |
|
public function getFullName(): string |
102
|
|
|
{ |
103
|
2 |
|
return $this->fullName; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @param string $fullName |
108
|
|
|
* |
109
|
|
|
* @return FindRequest |
110
|
|
|
*/ |
111
|
1 |
|
public function setFullName(string $fullName): FindRequest |
112
|
|
|
{ |
113
|
1 |
|
$this->fullName = $fullName; |
114
|
|
|
|
115
|
1 |
|
return $this; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @return string |
120
|
|
|
*/ |
121
|
2 |
|
public function getRegisterNumber(): string |
122
|
|
|
{ |
123
|
2 |
|
return $this->registerNumber; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @param string $registerNumber |
128
|
|
|
* |
129
|
|
|
* @return FindRequest |
130
|
|
|
*/ |
131
|
1 |
|
public function setRegisterNumber(string $registerNumber): FindRequest |
132
|
|
|
{ |
133
|
1 |
|
$this->registerNumber = $registerNumber; |
134
|
|
|
|
135
|
1 |
|
return $this; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return string |
140
|
|
|
*/ |
141
|
2 |
|
public function getCertificateNumber(): string |
142
|
|
|
{ |
143
|
2 |
|
return $this->certificateNumber; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @param string $certificateNumber |
148
|
|
|
* |
149
|
|
|
* @return FindRequest |
150
|
|
|
*/ |
151
|
1 |
|
public function setCertificateNumber(string $certificateNumber): FindRequest |
152
|
|
|
{ |
153
|
1 |
|
$this->certificateNumber = $certificateNumber; |
154
|
|
|
|
155
|
1 |
|
return $this; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @return int|null |
160
|
|
|
*/ |
161
|
2 |
|
public function getStatus(): ?int |
162
|
|
|
{ |
163
|
2 |
|
return $this->status; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @param int|null $status |
168
|
|
|
* |
169
|
|
|
* @return FindRequest |
170
|
|
|
*/ |
171
|
1 |
|
public function setStatus(?int $status): FindRequest |
172
|
|
|
{ |
173
|
1 |
|
$this->status = $status; |
174
|
|
|
|
175
|
1 |
|
return $this; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* @return int|null |
180
|
|
|
*/ |
181
|
2 |
|
public function getFormOfLegalPractice(): ?int |
182
|
|
|
{ |
183
|
2 |
|
return $this->formOfLegalPractice; |
184
|
|
|
} |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* @param int|null $formOfLegalPractice |
188
|
|
|
* |
189
|
|
|
* @return FindRequest |
190
|
|
|
*/ |
191
|
1 |
|
public function setFormOfLegalPractice(?int $formOfLegalPractice): FindRequest |
192
|
|
|
{ |
193
|
1 |
|
$this->formOfLegalPractice = $formOfLegalPractice; |
194
|
|
|
|
195
|
1 |
|
return $this; |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* @return string|null |
200
|
|
|
*/ |
201
|
2 |
|
public function getTerritorialSubject(): ?string |
202
|
|
|
{ |
203
|
2 |
|
return $this->territorialSubject; |
204
|
|
|
} |
205
|
|
|
|
206
|
|
|
/** |
207
|
|
|
* @param string|null $territorialSubject |
208
|
|
|
* |
209
|
|
|
* @return FindRequest |
210
|
|
|
*/ |
211
|
1 |
|
public function setTerritorialSubject(?string $territorialSubject): FindRequest |
212
|
|
|
{ |
213
|
1 |
|
$this->territorialSubject = $territorialSubject; |
214
|
|
|
|
215
|
1 |
|
return $this; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* @return int |
220
|
|
|
*/ |
221
|
2 |
|
public function getPage(): int |
222
|
|
|
{ |
223
|
2 |
|
return $this->page; |
224
|
|
|
} |
225
|
|
|
|
226
|
|
|
/** |
227
|
|
|
* @param int $page |
228
|
|
|
* |
229
|
|
|
* @return FindRequest |
230
|
|
|
*/ |
231
|
1 |
|
public function setPage(int $page): FindRequest |
232
|
|
|
{ |
233
|
1 |
|
$this->page = $page; |
234
|
|
|
|
235
|
1 |
|
return $this; |
236
|
|
|
} |
237
|
|
|
|
238
|
|
|
/** |
239
|
|
|
* @return bool |
240
|
|
|
*/ |
241
|
1 |
|
public function isFullData(): bool |
242
|
|
|
{ |
243
|
1 |
|
return $this->fullData; |
244
|
|
|
} |
245
|
|
|
|
246
|
|
|
/** |
247
|
|
|
* @param bool $fullData |
248
|
|
|
* |
249
|
|
|
* @return FindRequest |
250
|
|
|
*/ |
251
|
1 |
|
public function setFullData(bool $fullData = true): FindRequest |
252
|
|
|
{ |
253
|
1 |
|
$this->fullData = $fullData; |
254
|
|
|
|
255
|
1 |
|
return $this; |
256
|
|
|
} |
257
|
|
|
} |
258
|
|
|
|