1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Chadicus\Marvel\Api\Entities; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Represents a Marvel API Creator Entity |
7
|
|
|
* |
8
|
|
|
* @property-read integer $id The unique ID of the creator resource. |
9
|
|
|
* @property-read string $firstName The first name of the creator. |
10
|
|
|
* @property-read string $middleName The middle name of the creator. |
11
|
|
|
* @property-read string $lastName The last name of the creator. |
12
|
|
|
* @property-read string $suffix The suffix or honorific for the creator. |
13
|
|
|
* @property-read string $fullName The full name of the creator (a space-separated concatenation of the above four |
14
|
|
|
* fields). |
15
|
|
|
* @property-read DateTime $modified The date the resource was most recently modified. |
16
|
|
|
* @property-read string $resourceURI The canonical URL identifier for this resource. |
17
|
|
|
* @property-read Url[] $urls A set of public web site URLs for the resource. |
18
|
|
|
* @property-read Image $thumbnail The representative image for this creator. |
19
|
|
|
* @property-read ResourceList $series A resource list containing the series which feature work by this creator. |
20
|
|
|
* @property-read ResourceList $stories A resource list containing the stories which feature work by this creator. |
21
|
|
|
* @property-read ResourceList $comics A resource list containing the comics which feature work by this creator. |
22
|
|
|
* @property-read ResourceList $events A resource list containing the events which feature work by this creator. |
23
|
|
|
*/ |
24
|
|
|
class Creator extends AbstractEntity |
25
|
|
|
{ |
26
|
|
|
/** |
27
|
|
|
* @see AbstractEntity::getFilters(). |
28
|
|
|
* |
29
|
|
|
* @return array |
30
|
|
|
*/ |
31
|
|
|
final protected function getFilters() : array |
32
|
|
|
{ |
33
|
|
|
return [ |
34
|
|
|
'id' => [['int', true]], |
35
|
|
|
'firstName' => [['string', true, 0]], |
36
|
|
|
'middleName' => [['string', true, 0]], |
37
|
|
|
'lastName' => [['string', true, 0]], |
38
|
|
|
'suffix' => [['string', true, 0]], |
39
|
|
|
'fullName' => [['string', true, 0]], |
40
|
|
|
'modified' => [['date']], |
41
|
|
|
'resourceURI' => [['string', true, 0]], |
42
|
|
|
'urls' => ['default' => [], ['_urls']], |
43
|
|
|
'thumbnail' => ['default' => new Image(), ['image']], |
44
|
|
|
'series' => ['default' => new ResourceList(), ['resource-list']], |
45
|
|
|
'stories' => ['default' => new ResourceList(), ['resource-list']], |
46
|
|
|
'comics' => ['default' => new ResourceList(), ['resource-list']], |
47
|
|
|
'events' => ['default' => new ResourceList(), ['resource-list']], |
48
|
|
|
]; |
49
|
|
|
} |
50
|
|
|
} |
51
|
|
|
|