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