1 | <?php |
||
22 | class ResourceObject implements MetadataAwareInterface, LinksAwareInterface, RelationshipsAwareInterface |
||
23 | { |
||
24 | use ResourceBehaviour; |
||
25 | use AttributesContainer; |
||
26 | use MetadataContainer; |
||
27 | use LinksContainer; |
||
28 | use RelationshipsContainer; |
||
29 | |||
30 | /** |
||
31 | * ResourceObject constructor. |
||
32 | * |
||
33 | * @param string $id |
||
34 | * @param string $type |
||
35 | * @param array $attributes |
||
36 | * @param array $metadata |
||
37 | */ |
||
38 | 12 | public function __construct(string $id, string $type, array $attributes = [], array $metadata = []) |
|
45 | |||
46 | /** |
||
47 | * Cast to an array |
||
48 | * |
||
49 | * @return array |
||
50 | */ |
||
51 | 5 | public function toArray(): array |
|
65 | } |