1 | <?php |
||
25 | abstract class AbstractDocument implements |
||
26 | MetadataAwareInterface, |
||
27 | LinksAwareInterface, |
||
28 | ErrorsAwareInterface, |
||
29 | IncludedResourcesAwareInterface |
||
30 | { |
||
31 | use MetadataContainer; |
||
32 | use LinksContainer; |
||
33 | use ErrorsContainer; |
||
34 | use IncludedResourcesContainer; |
||
35 | |||
36 | /** |
||
37 | * JsonAPI-object |
||
38 | * |
||
39 | * @see http://jsonapi.org/format/#document-jsonapi-object |
||
40 | * |
||
41 | * @var JsonApiObject |
||
42 | */ |
||
43 | protected $jsonApi; |
||
44 | |||
45 | /** |
||
46 | * Set JsonAPI-object |
||
47 | * |
||
48 | * @param JsonApiObject $jsonApi |
||
49 | */ |
||
50 | 10 | public function setJsonApi(JsonApiObject $jsonApi) |
|
54 | |||
55 | /** |
||
56 | * Set JsonAPI-object |
||
57 | * |
||
58 | * @return JsonApiObject |
||
59 | */ |
||
60 | 5 | public function getJsonApi(): JsonApiObject |
|
64 | |||
65 | /** |
||
66 | * Cast to an array |
||
67 | * |
||
68 | * @return array |
||
69 | */ |
||
70 | 29 | public function toArray(): array |
|
87 | } |