|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Chadicus\Marvel\Api\Entities; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* Represents a Marvel API Event Entity |
|
7
|
|
|
* |
|
8
|
|
|
* @property-read integer $id The unique ID of the event resource. |
|
9
|
|
|
* @property-read string $title The title of the event. |
|
10
|
|
|
* @property-read string $description A description of the event. |
|
11
|
|
|
* @property-read string $resourceURI The canonical URL identifier for this resource. |
|
12
|
|
|
* @property-read Url[] $urls A set of public web site URLs for the event. |
|
13
|
|
|
* @property-read DateTime $modified The date the resource was most recently modified. |
|
14
|
|
|
* @property-read DateTime $start The date of publication of the first issue in this event. |
|
15
|
|
|
* @property-read DateTime $end The date of publication of the last issue in this event. |
|
16
|
|
|
* @property-read Image $thumbnail The representative image for this event. |
|
17
|
|
|
* @property-read ResourceList $comics A resource list containing the comics in this event. |
|
18
|
|
|
* @property-read ResourceList $stories A resource list containing the stories in this event. |
|
19
|
|
|
* @property-read ResourceList $series A resource list containing the series in this event. |
|
20
|
|
|
* @property-read ResourceList $characters A resource list containing the characters which appear in this event. |
|
21
|
|
|
* @property-read ResourceList $creators A resource list containing creators whose work appears in this event. |
|
22
|
|
|
* @property-read Summary $next A summary representation of the event which follows this event. |
|
23
|
|
|
* @property-read Summary $previous A summary representation of the event which preceded this event. |
|
24
|
|
|
*/ |
|
25
|
|
|
class Event extends AbstractEntity |
|
26
|
|
|
{ |
|
27
|
|
|
/** |
|
28
|
|
|
* @see AbstractEntity::getFilters() |
|
29
|
|
|
* |
|
30
|
|
|
* @return array |
|
31
|
|
|
*/ |
|
32
|
|
|
final protected function getFilters() : array |
|
33
|
|
|
{ |
|
34
|
|
|
return [ |
|
35
|
|
|
'id' => [['int', true]], |
|
36
|
|
|
'title' => [['string', true, 0]], |
|
37
|
|
|
'description' => [['string', true, 0]], |
|
38
|
|
|
'resourceURI' => [['string', true, 0]], |
|
39
|
|
|
'urls' => ['default' => [], ['_urls']], |
|
40
|
|
|
'modified' => [['date']], |
|
41
|
|
|
'start' => [['date']], |
|
42
|
|
|
'end' => [['date']], |
|
43
|
|
|
'thumbnail' => ['default' => new Image(), ['image']], |
|
44
|
|
|
'comics' => ['default' => new ResourceList(), ['resource-list']], |
|
45
|
|
|
'stories' => ['default' => new ResourceList(), ['resource-list']], |
|
46
|
|
|
'series' => ['default' => new ResourceList(), ['resource-list']], |
|
47
|
|
|
'characters' => ['default' => new ResourceList(), ['resource-list']], |
|
48
|
|
|
'creators' => ['default' => new ResourceList(), ['resource-list']], |
|
49
|
|
|
'next' => ['default' => new Summary(), ['summary']], |
|
50
|
|
|
'previous' => ['default' => new Summary(), ['summary']], |
|
51
|
|
|
]; |
|
52
|
|
|
} |
|
53
|
|
|
} |
|
54
|
|
|
|