1 | <?php |
||
23 | abstract class AbstractDocument implements MetadataAwareInterface, LinksAwareInterface, ErrorsAwareInterface |
||
24 | { |
||
25 | use MetadataContainer; |
||
26 | use LinksContainer; |
||
27 | use ErrorsContainer; |
||
28 | |||
29 | /** |
||
30 | * JsonAPI-object |
||
31 | * |
||
32 | * @see http://jsonapi.org/format/#document-jsonapi-object |
||
33 | * |
||
34 | * @var JsonApiObject |
||
35 | */ |
||
36 | protected $jsonApi; |
||
37 | |||
38 | /** |
||
39 | * Set JsonAPI-object |
||
40 | * |
||
41 | * @param JsonApiObject $jsonApi |
||
42 | */ |
||
43 | 10 | public function setJsonApi(JsonApiObject $jsonApi) |
|
47 | |||
48 | /** |
||
49 | * Set JsonAPI-object |
||
50 | * |
||
51 | * @return JsonApiObject |
||
52 | */ |
||
53 | 5 | public function getJsonApi(): JsonApiObject |
|
57 | |||
58 | /** |
||
59 | * Cast to an array |
||
60 | * |
||
61 | * @return array |
||
62 | */ |
||
63 | 24 | public function toArray(): array |
|
79 | } |