1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Werkspot\KvkApi\Http\Search; |
6
|
|
|
|
7
|
|
|
final class ProfileQuery implements QueryInterface |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* @info KvK number, identifying number for a registration in the Netherlands Business Register. Consists of 8 digits |
11
|
|
|
* @var int |
12
|
|
|
*/ |
13
|
|
|
private $kvkNumber; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @info Branch number (Vestigingsnummer), identifying number of a branch. Consists of 12 digits |
17
|
|
|
* @var string |
18
|
|
|
*/ |
19
|
|
|
private $branchNumber; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* @info RSIN is an identification number for legal entities and partnerships. Consist of only digits |
23
|
|
|
* @var int |
24
|
|
|
*/ |
25
|
|
|
private $rsin; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @info Indication to include searching through inactive dossiers/deregistered companies. |
29
|
|
|
* @note History of inactive companies is after 1 January 2012 |
30
|
|
|
* @var bool |
31
|
|
|
*/ |
32
|
|
|
private $includeInactiveRegistrations; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @info restrictToMainBranch Search is restricted to main branches. |
36
|
|
|
* @var bool |
37
|
|
|
*/ |
38
|
|
|
private $restrictToMainBranch; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @info Defines the search collection for the query |
42
|
|
|
* @var string |
43
|
|
|
*/ |
44
|
|
|
private $site; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @info User can optionally add a context to identify his result later on |
48
|
|
|
* @var string |
49
|
|
|
*/ |
50
|
|
|
private $context; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @info Free format text search for in the compiled search description. |
54
|
|
|
* @var string |
55
|
|
|
*/ |
56
|
|
|
private $q; |
57
|
|
|
|
58
|
5 |
|
public function getKvkNumber(): int |
59
|
|
|
{ |
60
|
5 |
|
return $this->kvkNumber; |
61
|
|
|
} |
62
|
|
|
|
63
|
23 |
|
public function setKvkNumber(int $kvkNumber): void |
64
|
|
|
{ |
65
|
23 |
|
$this->kvkNumber = $kvkNumber; |
66
|
23 |
|
} |
67
|
|
|
|
68
|
5 |
|
public function getBranchNumber(): string |
69
|
|
|
{ |
70
|
5 |
|
return $this->branchNumber; |
71
|
|
|
} |
72
|
|
|
|
73
|
5 |
|
public function setBranchNumber(string $branchNumber): void |
74
|
|
|
{ |
75
|
5 |
|
$this->branchNumber = $branchNumber; |
76
|
5 |
|
} |
77
|
|
|
|
78
|
5 |
|
public function getRsin(): int |
79
|
|
|
{ |
80
|
5 |
|
return $this->rsin; |
81
|
|
|
} |
82
|
|
|
|
83
|
5 |
|
public function setRsin(int $rsin): void |
84
|
|
|
{ |
85
|
5 |
|
$this->rsin = $rsin; |
86
|
5 |
|
} |
87
|
|
|
|
88
|
2 |
|
public function isIncludeInactiveRegistrations(): bool |
89
|
|
|
{ |
90
|
2 |
|
return $this->includeInactiveRegistrations; |
91
|
|
|
} |
92
|
|
|
|
93
|
2 |
|
public function setIncludeInactiveRegistrations(bool $includeInactiveRegistrations): void |
94
|
|
|
{ |
95
|
2 |
|
$this->includeInactiveRegistrations = $includeInactiveRegistrations; |
96
|
2 |
|
} |
97
|
|
|
|
98
|
2 |
|
public function isRestrictToMainBranch(): bool |
99
|
|
|
{ |
100
|
2 |
|
return $this->restrictToMainBranch; |
101
|
|
|
} |
102
|
|
|
|
103
|
2 |
|
public function setRestrictToMainBranch(bool $restrictToMainBranch): void |
104
|
|
|
{ |
105
|
2 |
|
$this->restrictToMainBranch = $restrictToMainBranch; |
106
|
2 |
|
} |
107
|
|
|
|
108
|
5 |
|
public function getSite() |
109
|
|
|
{ |
110
|
5 |
|
return $this->site; |
111
|
|
|
} |
112
|
|
|
|
113
|
5 |
|
public function setSite($site): void |
114
|
|
|
{ |
115
|
5 |
|
$this->site = $site; |
116
|
5 |
|
} |
117
|
|
|
|
118
|
5 |
|
public function getContext(): string |
119
|
|
|
{ |
120
|
5 |
|
return $this->context; |
121
|
|
|
} |
122
|
|
|
|
123
|
5 |
|
public function setContext(string $context): void |
124
|
|
|
{ |
125
|
5 |
|
$this->context = $context; |
126
|
5 |
|
} |
127
|
|
|
|
128
|
5 |
|
public function getQ(): string |
129
|
|
|
{ |
130
|
5 |
|
return $this->q; |
131
|
|
|
} |
132
|
|
|
|
133
|
5 |
|
public function setQ(string $q): void |
134
|
|
|
{ |
135
|
5 |
|
$this->q = $q; |
136
|
5 |
|
} |
137
|
|
|
|
138
|
52 |
|
public function get(): array |
139
|
|
|
{ |
140
|
52 |
|
return get_object_vars($this); |
141
|
|
|
} |
142
|
|
|
} |
143
|
|
|
|