1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the Veslo project <https://github.com/symfony-doge/veslo>. |
5
|
|
|
* |
6
|
|
|
* (C) 2019 Pavel Petrov <[email protected]>. |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
* |
11
|
|
|
* @license https://opensource.org/licenses/GPL-3.0 GPL-3.0 |
12
|
|
|
*/ |
13
|
|
|
|
14
|
|
|
declare(strict_types=1); |
15
|
|
|
|
16
|
|
|
namespace Veslo\AnthillBundle\Dto\Vacancy\Collector; |
17
|
|
|
|
18
|
|
|
use Veslo\AnthillBundle\Dto\Vacancy\Parser\ParsedDto; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Context of vacancy data that has been accepted for persisting and research |
22
|
|
|
*/ |
23
|
|
|
class AcceptanceDto |
24
|
|
|
{ |
25
|
|
|
/** |
26
|
|
|
* Assigned identifier for a newly created vacancy entity |
27
|
|
|
* |
28
|
|
|
* @var int|null |
29
|
|
|
*/ |
30
|
|
|
private $vacancyId; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Iterable set of conditions which has been checked to ensure vacancy data should be collected and analysed |
34
|
|
|
* |
35
|
|
|
* @var iterable|string[] |
36
|
|
|
*/ |
37
|
|
|
private $conditions; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Context of parsed vacancy data |
41
|
|
|
* |
42
|
|
|
* @var ParsedDto |
43
|
|
|
*/ |
44
|
|
|
private $data; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* AcceptanceDto constructor. |
48
|
|
|
*/ |
49
|
|
|
public function __construct() |
50
|
|
|
{ |
51
|
|
|
$this->conditions = []; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Returns assigned identifier for a newly created vacancy entity |
56
|
|
|
* |
57
|
|
|
* @return int|null |
58
|
|
|
*/ |
59
|
|
|
public function getVacancyId(): ?int |
60
|
|
|
{ |
61
|
|
|
return $this->vacancyId; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Sets assigned identifier for a newly created vacancy entity |
66
|
|
|
* |
67
|
|
|
* @param int $vacancyId Assigned identifier for a newly created vacancy entity |
68
|
|
|
* |
69
|
|
|
* @return void |
70
|
|
|
*/ |
71
|
|
|
public function setVacancyId(int $vacancyId): void |
72
|
|
|
{ |
73
|
|
|
$this->vacancyId = $vacancyId; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* Returns iterable set of conditions which has been checked to ensure vacancy data should be collected |
78
|
|
|
* |
79
|
|
|
* @return iterable|string[] |
80
|
|
|
*/ |
81
|
|
|
public function getConditions(): iterable |
82
|
|
|
{ |
83
|
|
|
return $this->conditions; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* Sets iterable set of conditions which has been checked to ensure vacancy data should be collected |
88
|
|
|
* |
89
|
|
|
* @param iterable|string[] $conditions Conditions which has been checked to ensure vacancy data should be collected |
90
|
|
|
* |
91
|
|
|
* @return void |
92
|
|
|
*/ |
93
|
|
|
public function setConditions(iterable $conditions): void |
94
|
|
|
{ |
95
|
|
|
$this->conditions = $conditions; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* Returns context of parsed vacancy data |
100
|
|
|
* |
101
|
|
|
* @return ParsedDto |
102
|
|
|
*/ |
103
|
|
|
public function getData(): ParsedDto |
104
|
|
|
{ |
105
|
|
|
return $this->data; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* Sets context of parsed vacancy data |
110
|
|
|
* |
111
|
|
|
* @param ParsedDto $data Context of parsed vacancy data |
112
|
|
|
* |
113
|
|
|
* @return void |
114
|
|
|
*/ |
115
|
|
|
public function setData(ParsedDto $data): void |
116
|
|
|
{ |
117
|
|
|
$this->data = $data; |
118
|
|
|
} |
119
|
|
|
} |
120
|
|
|
|