1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Spatie\SchemaOrg; |
4
|
|
|
|
5
|
|
|
use Spatie\SchemaOrg\Exceptions\InvalidProperty; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* A listing that describes a job opening in a certain organization. |
9
|
|
|
* |
10
|
|
|
* @see http://schema.org/JobPosting |
11
|
|
|
*/ |
12
|
|
|
class JobPosting extends Intangible |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* The base salary of the job or of an employee in an EmployeeRole. |
16
|
|
|
* |
17
|
|
|
* @param float|int|\Spatie\SchemaOrg\PriceSpecification|\Spatie\SchemaOrg\MonetaryAmount $baseSalary |
18
|
|
|
* |
19
|
|
|
* @return static |
20
|
|
|
* |
21
|
|
|
* @see http://schema.org/baseSalary |
22
|
|
|
*/ |
23
|
|
|
public function baseSalary($baseSalary) |
24
|
|
|
{ |
25
|
|
|
return $this->setProperty('baseSalary', $baseSalary); |
26
|
|
|
} |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Description of benefits associated with the job. |
30
|
|
|
* |
31
|
|
|
* @param string $benefits |
32
|
|
|
* |
33
|
|
|
* @return static |
34
|
|
|
* |
35
|
|
|
* @see http://schema.org/benefits |
36
|
|
|
*/ |
37
|
|
|
public function benefits($benefits) |
38
|
|
|
{ |
39
|
|
|
return $this->setProperty('benefits', $benefits); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Description of benefits associated with the job. |
44
|
|
|
* |
45
|
|
|
* @param string $jobBenefits |
46
|
|
|
* |
47
|
|
|
* @return static |
48
|
|
|
* |
49
|
|
|
* @see http://schema.org/jobBenefits |
50
|
|
|
*/ |
51
|
|
|
public function jobBenefits($jobBenefits) |
52
|
|
|
{ |
53
|
|
|
return $this->setProperty('jobBenefits', $jobBenefits); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* Publication date for the job posting. |
58
|
|
|
* |
59
|
|
|
* @param \DateTimeInterface $datePosted |
60
|
|
|
* |
61
|
|
|
* @return static |
62
|
|
|
* |
63
|
|
|
* @see http://schema.org/datePosted |
64
|
|
|
*/ |
65
|
|
|
public function datePosted($datePosted) |
66
|
|
|
{ |
67
|
|
|
return $this->setProperty('datePosted', $datePosted); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Educational background needed for the position. |
72
|
|
|
* |
73
|
|
|
* @param string $educationRequirements |
74
|
|
|
* |
75
|
|
|
* @return static |
76
|
|
|
* |
77
|
|
|
* @see http://schema.org/educationRequirements |
78
|
|
|
*/ |
79
|
|
|
public function educationRequirements($educationRequirements) |
80
|
|
|
{ |
81
|
|
|
return $this->setProperty('educationRequirements', $educationRequirements); |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* Type of employment (e.g. full-time, part-time, contract, temporary, |
86
|
|
|
* seasonal, internship). |
87
|
|
|
* |
88
|
|
|
* @param string $employmentType |
89
|
|
|
* |
90
|
|
|
* @return static |
91
|
|
|
* |
92
|
|
|
* @see http://schema.org/employmentType |
93
|
|
|
*/ |
94
|
|
|
public function employmentType($employmentType) |
95
|
|
|
{ |
96
|
|
|
return $this->setProperty('employmentType', $employmentType); |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* Types of employment |
101
|
|
|
* |
102
|
|
|
* Allowed Values: FULL_TIME, PART_TIME, CONTRACTOR, TEMPORARY, |
103
|
|
|
* INTERN, VOLUNTEER, PER_DIEM, OTHER |
104
|
|
|
* |
105
|
|
|
* @param array ...$employmentTypes |
106
|
|
|
* |
107
|
|
|
* @return static |
108
|
|
|
* |
109
|
|
|
* @see https://developers.google.com/search/docs/data-types/job-postings |
110
|
|
|
*/ |
111
|
|
|
public function employmentTypes(... $employmentTypes) |
112
|
|
|
{ |
113
|
|
|
return $this->setProperty('employmentType', $employmentTypes); |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* Description of skills and experience needed for the position. |
118
|
|
|
* |
119
|
|
|
* @param string $experienceRequirements |
120
|
|
|
* |
121
|
|
|
* @return static |
122
|
|
|
* |
123
|
|
|
* @see http://schema.org/experienceRequirements |
124
|
|
|
*/ |
125
|
|
|
public function experienceRequirements($experienceRequirements) |
126
|
|
|
{ |
127
|
|
|
return $this->setProperty('experienceRequirements', $experienceRequirements); |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Organization offering the job position. |
132
|
|
|
* |
133
|
|
|
* @param \Spatie\SchemaOrg\Organization $hiringOrganization |
134
|
|
|
* |
135
|
|
|
* @return static |
136
|
|
|
* |
137
|
|
|
* @see http://schema.org/hiringOrganization |
138
|
|
|
*/ |
139
|
|
|
public function hiringOrganization($hiringOrganization) |
140
|
|
|
{ |
141
|
|
|
return $this->setProperty('hiringOrganization', $hiringOrganization); |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* Description of bonus and commission compensation aspects of the job. |
146
|
|
|
* |
147
|
|
|
* @param string $incentives |
148
|
|
|
* |
149
|
|
|
* @return static |
150
|
|
|
* |
151
|
|
|
* @see http://schema.org/incentives |
152
|
|
|
*/ |
153
|
|
|
public function incentives($incentives) |
154
|
|
|
{ |
155
|
|
|
return $this->setProperty('incentives', $incentives); |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* Description of bonus and commission compensation aspects of the job. |
160
|
|
|
* |
161
|
|
|
* @param string $incentiveCompensation |
162
|
|
|
* |
163
|
|
|
* @return static |
164
|
|
|
* |
165
|
|
|
* @see http://schema.org/incentiveCompensation |
166
|
|
|
*/ |
167
|
|
|
public function incentiveCompensation($incentiveCompensation) |
168
|
|
|
{ |
169
|
|
|
return $this->setProperty('incentiveCompensation', $incentiveCompensation); |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* The industry associated with the job position. |
174
|
|
|
* |
175
|
|
|
* @param string $industry |
176
|
|
|
* |
177
|
|
|
* @return static |
178
|
|
|
* |
179
|
|
|
* @see http://schema.org/industry |
180
|
|
|
*/ |
181
|
|
|
public function industry($industry) |
182
|
|
|
{ |
183
|
|
|
return $this->setProperty('industry', $industry); |
184
|
|
|
} |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* A (typically single) geographic location associated with the job |
188
|
|
|
* position. |
189
|
|
|
* |
190
|
|
|
* @param \Spatie\SchemaOrg\Place $jobLocation |
191
|
|
|
* |
192
|
|
|
* @return static |
193
|
|
|
* |
194
|
|
|
* @see http://schema.org/jobLocation |
195
|
|
|
*/ |
196
|
|
|
public function jobLocation($jobLocation) |
197
|
|
|
{ |
198
|
|
|
return $this->setProperty('jobLocation', $jobLocation); |
199
|
|
|
} |
200
|
|
|
|
201
|
|
|
public function jobLocations(... $jobLocations) |
202
|
|
|
{ |
203
|
|
|
foreach ($jobLocations as $jobLocation) { |
204
|
|
|
if (!$jobLocation instanceof Place) { |
205
|
|
|
throw new InvalidProperty("A Job Location must be of type Place"); |
206
|
|
|
} |
207
|
|
|
} |
208
|
|
|
|
209
|
|
|
return $this->setProperty('jobLocation', $jobLocations); |
210
|
|
|
} |
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* Category or categories describing the job. Use BLS O*NET-SOC taxonomy: |
214
|
|
|
* http://www.onetcenter.org/taxonomy.html. Ideally includes textual label |
215
|
|
|
* and formal code, with the property repeated for each applicable value. |
216
|
|
|
* |
217
|
|
|
* @param string $occupationalCategory |
218
|
|
|
* |
219
|
|
|
* @return static |
220
|
|
|
* |
221
|
|
|
* @see http://schema.org/occupationalCategory |
222
|
|
|
*/ |
223
|
|
|
public function occupationalCategory($occupationalCategory) |
224
|
|
|
{ |
225
|
|
|
return $this->setProperty('occupationalCategory', $occupationalCategory); |
226
|
|
|
} |
227
|
|
|
|
228
|
|
|
/** |
229
|
|
|
* Specific qualifications required for this role. |
230
|
|
|
* |
231
|
|
|
* @param string $qualifications |
232
|
|
|
* |
233
|
|
|
* @return static |
234
|
|
|
* |
235
|
|
|
* @see http://schema.org/qualifications |
236
|
|
|
*/ |
237
|
|
|
public function qualifications($qualifications) |
238
|
|
|
{ |
239
|
|
|
return $this->setProperty('qualifications', $qualifications); |
240
|
|
|
} |
241
|
|
|
|
242
|
|
|
/** |
243
|
|
|
* Responsibilities associated with this role. |
244
|
|
|
* |
245
|
|
|
* @param string $responsibilities |
246
|
|
|
* |
247
|
|
|
* @return static |
248
|
|
|
* |
249
|
|
|
* @see http://schema.org/responsibilities |
250
|
|
|
*/ |
251
|
|
|
public function responsibilities($responsibilities) |
252
|
|
|
{ |
253
|
|
|
return $this->setProperty('responsibilities', $responsibilities); |
254
|
|
|
} |
255
|
|
|
|
256
|
|
|
/** |
257
|
|
|
* The currency (coded using [ISO |
258
|
|
|
* 4217](http://en.wikipedia.org/wiki/ISO_4217) ) used for the main salary |
259
|
|
|
* information in this job posting or for this employee. |
260
|
|
|
* |
261
|
|
|
* @param string $salaryCurrency |
262
|
|
|
* |
263
|
|
|
* @return static |
264
|
|
|
* |
265
|
|
|
* @see http://schema.org/salaryCurrency |
266
|
|
|
*/ |
267
|
|
|
public function salaryCurrency($salaryCurrency) |
268
|
|
|
{ |
269
|
|
|
return $this->setProperty('salaryCurrency', $salaryCurrency); |
270
|
|
|
} |
271
|
|
|
|
272
|
|
|
/** |
273
|
|
|
* Skills required to fulfill this role. |
274
|
|
|
* |
275
|
|
|
* @param string $skills |
276
|
|
|
* |
277
|
|
|
* @return static |
278
|
|
|
* |
279
|
|
|
* @see http://schema.org/skills |
280
|
|
|
*/ |
281
|
|
|
public function skills($skills) |
282
|
|
|
{ |
283
|
|
|
return $this->setProperty('skills', $skills); |
284
|
|
|
} |
285
|
|
|
|
286
|
|
|
/** |
287
|
|
|
* Any special commitments associated with this job posting. Valid entries |
288
|
|
|
* include VeteranCommit, MilitarySpouseCommit, etc. |
289
|
|
|
* |
290
|
|
|
* @param string $specialCommitments |
291
|
|
|
* |
292
|
|
|
* @return static |
293
|
|
|
* |
294
|
|
|
* @see http://schema.org/specialCommitments |
295
|
|
|
*/ |
296
|
|
|
public function specialCommitments($specialCommitments) |
297
|
|
|
{ |
298
|
|
|
return $this->setProperty('specialCommitments', $specialCommitments); |
299
|
|
|
} |
300
|
|
|
|
301
|
|
|
/** |
302
|
|
|
* The title of the job. |
303
|
|
|
* |
304
|
|
|
* @param string $title |
305
|
|
|
* |
306
|
|
|
* @return static |
307
|
|
|
* |
308
|
|
|
* @see http://schema.org/title |
309
|
|
|
*/ |
310
|
|
|
public function title($title) |
311
|
|
|
{ |
312
|
|
|
return $this->setProperty('title', $title); |
313
|
|
|
} |
314
|
|
|
|
315
|
|
|
/** |
316
|
|
|
* The date after when the item is not valid. For example the end of an |
317
|
|
|
* offer, salary period, or a period of opening hours. |
318
|
|
|
* |
319
|
|
|
* @param \DateTimeInterface $validThrough |
320
|
|
|
* |
321
|
|
|
* @return static |
322
|
|
|
* |
323
|
|
|
* @see http://schema.org/validThrough |
324
|
|
|
*/ |
325
|
|
|
public function validThrough($validThrough) |
326
|
|
|
{ |
327
|
|
|
return $this->setProperty('validThrough', $validThrough); |
328
|
|
|
} |
329
|
|
|
|
330
|
|
|
/** |
331
|
|
|
* The typical working hours for this job (e.g. 1st shift, night shift, |
332
|
|
|
* 8am-5pm). |
333
|
|
|
* |
334
|
|
|
* @param string $workHours |
335
|
|
|
* |
336
|
|
|
* @return static |
337
|
|
|
* |
338
|
|
|
* @see http://schema.org/workHours |
339
|
|
|
*/ |
340
|
|
|
public function workHours($workHours) |
341
|
|
|
{ |
342
|
|
|
return $this->setProperty('workHours', $workHours); |
343
|
|
|
} |
344
|
|
|
|
345
|
|
|
} |
346
|
|
|
|