1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Spatie\SchemaOrg; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* A media object, such as an image, video, or audio object embedded in a web |
7
|
|
|
* page or a downloadable dataset i.e. DataDownload. Note that a creative work |
8
|
|
|
* may have many media objects associated with it on the same web page. For |
9
|
|
|
* example, a page about a single song (MusicRecording) may have a music video |
10
|
|
|
* (VideoObject), and a high and low bandwidth audio stream (2 AudioObject's). |
11
|
|
|
* |
12
|
|
|
* @see http://schema.org/MediaObject |
13
|
|
|
* |
14
|
|
|
* @mixin \Spatie\SchemaOrg\CreativeWork |
15
|
|
|
*/ |
16
|
|
|
class MediaObject extends BaseType |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* A NewsArticle associated with the Media Object. |
20
|
|
|
* |
21
|
|
|
* @param NewsArticle|NewsArticle[] $associatedArticle |
22
|
|
|
* |
23
|
|
|
* @return static |
24
|
|
|
* |
25
|
|
|
* @see http://schema.org/associatedArticle |
26
|
|
|
*/ |
27
|
|
|
public function associatedArticle($associatedArticle) |
28
|
|
|
{ |
29
|
|
|
return $this->setProperty('associatedArticle', $associatedArticle); |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* The bitrate of the media object. |
34
|
|
|
* |
35
|
|
|
* @param string|string[] $bitrate |
36
|
|
|
* |
37
|
|
|
* @return static |
38
|
|
|
* |
39
|
|
|
* @see http://schema.org/bitrate |
40
|
|
|
*/ |
41
|
|
|
public function bitrate($bitrate) |
42
|
|
|
{ |
43
|
|
|
return $this->setProperty('bitrate', $bitrate); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* File size in (mega/kilo) bytes. |
48
|
|
|
* |
49
|
|
|
* @param string|string[] $contentSize |
50
|
|
|
* |
51
|
|
|
* @return static |
52
|
|
|
* |
53
|
|
|
* @see http://schema.org/contentSize |
54
|
|
|
*/ |
55
|
|
|
public function contentSize($contentSize) |
56
|
|
|
{ |
57
|
|
|
return $this->setProperty('contentSize', $contentSize); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Actual bytes of the media object, for example the image file or video |
62
|
|
|
* file. |
63
|
|
|
* |
64
|
|
|
* @param string|string[] $contentUrl |
65
|
|
|
* |
66
|
|
|
* @return static |
67
|
|
|
* |
68
|
|
|
* @see http://schema.org/contentUrl |
69
|
|
|
*/ |
70
|
|
|
public function contentUrl($contentUrl) |
71
|
|
|
{ |
72
|
|
|
return $this->setProperty('contentUrl', $contentUrl); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* The duration of the item (movie, audio recording, event, etc.) in [ISO |
77
|
|
|
* 8601 date format](http://en.wikipedia.org/wiki/ISO_8601). |
78
|
|
|
* |
79
|
|
|
* @param Duration|Duration[] $duration |
80
|
|
|
* |
81
|
|
|
* @return static |
82
|
|
|
* |
83
|
|
|
* @see http://schema.org/duration |
84
|
|
|
*/ |
85
|
|
|
public function duration($duration) |
86
|
|
|
{ |
87
|
|
|
return $this->setProperty('duration', $duration); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* A URL pointing to a player for a specific video. In general, this is the |
92
|
|
|
* information in the ```src``` element of an ```embed``` tag and should not |
93
|
|
|
* be the same as the content of the ```loc``` tag. |
94
|
|
|
* |
95
|
|
|
* @param string|string[] $embedUrl |
96
|
|
|
* |
97
|
|
|
* @return static |
98
|
|
|
* |
99
|
|
|
* @see http://schema.org/embedUrl |
100
|
|
|
*/ |
101
|
|
|
public function embedUrl($embedUrl) |
102
|
|
|
{ |
103
|
|
|
return $this->setProperty('embedUrl', $embedUrl); |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* The CreativeWork encoded by this media object. |
108
|
|
|
* |
109
|
|
|
* @param CreativeWork|CreativeWork[] $encodesCreativeWork |
110
|
|
|
* |
111
|
|
|
* @return static |
112
|
|
|
* |
113
|
|
|
* @see http://schema.org/encodesCreativeWork |
114
|
|
|
*/ |
115
|
|
|
public function encodesCreativeWork($encodesCreativeWork) |
116
|
|
|
{ |
117
|
|
|
return $this->setProperty('encodesCreativeWork', $encodesCreativeWork); |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* Media type typically expressed using a MIME format (see [IANA |
122
|
|
|
* site](http://www.iana.org/assignments/media-types/media-types.xhtml) and |
123
|
|
|
* [MDN |
124
|
|
|
* reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)) |
125
|
|
|
* e.g. application/zip for a SoftwareApplication binary, audio/mpeg for |
126
|
|
|
* .mp3 etc.). |
127
|
|
|
* |
128
|
|
|
* In cases where a [[CreativeWork]] has several media type representations, |
129
|
|
|
* [[encoding]] can be used to indicate each [[MediaObject]] alongside |
130
|
|
|
* particular [[encodingFormat]] information. |
131
|
|
|
* |
132
|
|
|
* Unregistered or niche encoding and file formats can be indicated instead |
133
|
|
|
* via the most appropriate URL, e.g. defining Web page or a |
134
|
|
|
* Wikipedia/Wikidata entry. |
135
|
|
|
* |
136
|
|
|
* @param string|string[] $encodingFormat |
137
|
|
|
* |
138
|
|
|
* @return static |
139
|
|
|
* |
140
|
|
|
* @see http://schema.org/encodingFormat |
141
|
|
|
*/ |
142
|
|
|
public function encodingFormat($encodingFormat) |
143
|
|
|
{ |
144
|
|
|
return $this->setProperty('encodingFormat', $encodingFormat); |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* The endTime of something. For a reserved event or service (e.g. |
149
|
|
|
* FoodEstablishmentReservation), the time that it is expected to end. For |
150
|
|
|
* actions that span a period of time, when the action was performed. e.g. |
151
|
|
|
* John wrote a book from January to *December*. For media, including audio |
152
|
|
|
* and video, it's the time offset of the end of a clip within a larger |
153
|
|
|
* file. |
154
|
|
|
* |
155
|
|
|
* Note that Event uses startDate/endDate instead of startTime/endTime, even |
156
|
|
|
* when describing dates with times. This situation may be clarified in |
157
|
|
|
* future revisions. |
158
|
|
|
* |
159
|
|
|
* @param \DateTimeInterface|\DateTimeInterface[] $endTime |
160
|
|
|
* |
161
|
|
|
* @return static |
162
|
|
|
* |
163
|
|
|
* @see http://schema.org/endTime |
164
|
|
|
*/ |
165
|
|
|
public function endTime($endTime) |
166
|
|
|
{ |
167
|
|
|
return $this->setProperty('endTime', $endTime); |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* The height of the item. |
172
|
|
|
* |
173
|
|
|
* @param Distance|Distance[]|QuantitativeValue|QuantitativeValue[] $height |
174
|
|
|
* |
175
|
|
|
* @return static |
176
|
|
|
* |
177
|
|
|
* @see http://schema.org/height |
178
|
|
|
*/ |
179
|
|
|
public function height($height) |
180
|
|
|
{ |
181
|
|
|
return $this->setProperty('height', $height); |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* Player type required—for example, Flash or Silverlight. |
186
|
|
|
* |
187
|
|
|
* @param string|string[] $playerType |
188
|
|
|
* |
189
|
|
|
* @return static |
190
|
|
|
* |
191
|
|
|
* @see http://schema.org/playerType |
192
|
|
|
*/ |
193
|
|
|
public function playerType($playerType) |
194
|
|
|
{ |
195
|
|
|
return $this->setProperty('playerType', $playerType); |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* The production company or studio responsible for the item e.g. series, |
200
|
|
|
* video game, episode etc. |
201
|
|
|
* |
202
|
|
|
* @param Organization|Organization[] $productionCompany |
203
|
|
|
* |
204
|
|
|
* @return static |
205
|
|
|
* |
206
|
|
|
* @see http://schema.org/productionCompany |
207
|
|
|
*/ |
208
|
|
|
public function productionCompany($productionCompany) |
209
|
|
|
{ |
210
|
|
|
return $this->setProperty('productionCompany', $productionCompany); |
211
|
|
|
} |
212
|
|
|
|
213
|
|
|
/** |
214
|
|
|
* The regions where the media is allowed. If not specified, then it's |
215
|
|
|
* assumed to be allowed everywhere. Specify the countries in [ISO 3166 |
216
|
|
|
* format](http://en.wikipedia.org/wiki/ISO_3166). |
217
|
|
|
* |
218
|
|
|
* @param Place|Place[] $regionsAllowed |
219
|
|
|
* |
220
|
|
|
* @return static |
221
|
|
|
* |
222
|
|
|
* @see http://schema.org/regionsAllowed |
223
|
|
|
*/ |
224
|
|
|
public function regionsAllowed($regionsAllowed) |
225
|
|
|
{ |
226
|
|
|
return $this->setProperty('regionsAllowed', $regionsAllowed); |
227
|
|
|
} |
228
|
|
|
|
229
|
|
|
/** |
230
|
|
|
* Indicates if use of the media require a subscription (either paid or |
231
|
|
|
* free). Allowed values are ```true``` or ```false``` (note that an earlier |
232
|
|
|
* version had 'yes', 'no'). |
233
|
|
|
* |
234
|
|
|
* @param bool|bool[] $requiresSubscription |
235
|
|
|
* |
236
|
|
|
* @return static |
237
|
|
|
* |
238
|
|
|
* @see http://schema.org/requiresSubscription |
239
|
|
|
*/ |
240
|
|
|
public function requiresSubscription($requiresSubscription) |
241
|
|
|
{ |
242
|
|
|
return $this->setProperty('requiresSubscription', $requiresSubscription); |
243
|
|
|
} |
244
|
|
|
|
245
|
|
|
/** |
246
|
|
|
* The startTime of something. For a reserved event or service (e.g. |
247
|
|
|
* FoodEstablishmentReservation), the time that it is expected to start. For |
248
|
|
|
* actions that span a period of time, when the action was performed. e.g. |
249
|
|
|
* John wrote a book from *January* to December. For media, including audio |
250
|
|
|
* and video, it's the time offset of the start of a clip within a larger |
251
|
|
|
* file. |
252
|
|
|
* |
253
|
|
|
* Note that Event uses startDate/endDate instead of startTime/endTime, even |
254
|
|
|
* when describing dates with times. This situation may be clarified in |
255
|
|
|
* future revisions. |
256
|
|
|
* |
257
|
|
|
* @param \DateTimeInterface|\DateTimeInterface[] $startTime |
258
|
|
|
* |
259
|
|
|
* @return static |
260
|
|
|
* |
261
|
|
|
* @see http://schema.org/startTime |
262
|
|
|
*/ |
263
|
|
|
public function startTime($startTime) |
264
|
|
|
{ |
265
|
|
|
return $this->setProperty('startTime', $startTime); |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
/** |
269
|
|
|
* Date when this media object was uploaded to this site. |
270
|
|
|
* |
271
|
|
|
* @param \DateTimeInterface|\DateTimeInterface[] $uploadDate |
272
|
|
|
* |
273
|
|
|
* @return static |
274
|
|
|
* |
275
|
|
|
* @see http://schema.org/uploadDate |
276
|
|
|
*/ |
277
|
|
|
public function uploadDate($uploadDate) |
278
|
|
|
{ |
279
|
|
|
return $this->setProperty('uploadDate', $uploadDate); |
280
|
|
|
} |
281
|
|
|
|
282
|
|
|
/** |
283
|
|
|
* The width of the item. |
284
|
|
|
* |
285
|
|
|
* @param Distance|Distance[]|QuantitativeValue|QuantitativeValue[] $width |
286
|
|
|
* |
287
|
|
|
* @return static |
288
|
|
|
* |
289
|
|
|
* @see http://schema.org/width |
290
|
|
|
*/ |
291
|
|
|
public function width($width) |
292
|
|
|
{ |
293
|
|
|
return $this->setProperty('width', $width); |
294
|
|
|
} |
295
|
|
|
|
296
|
|
|
} |
297
|
|
|
|