| 1 | <?php |
||
| 17 | class ResourceIdentifierObject implements MetadataAwareInterface |
||
| 18 | { |
||
| 19 | use ResourceBehaviour; |
||
| 20 | use MetadataContainer; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * ResourceObject constructor. |
||
| 24 | * |
||
| 25 | * @param string $id |
||
| 26 | * @param string $type |
||
| 27 | * @param array $metadata |
||
| 28 | */ |
||
| 29 | 10 | public function __construct(string $id, string $type, array $metadata = []) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Cast to an array |
||
| 38 | * |
||
| 39 | * @return array |
||
| 40 | */ |
||
| 41 | 2 | public function toArray(): array |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Cast to a string |
||
| 54 | * |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | 3 | public function __toString(): string |
|
| 61 | } |