1 | <?php |
||
11 | class Link |
||
12 | { |
||
13 | /** |
||
14 | * Reference to a resource |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $reference; |
||
19 | |||
20 | /** |
||
21 | * Extra metadata |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $metadata; |
||
26 | |||
27 | /** |
||
28 | * Link constructor. |
||
29 | * |
||
30 | * @param string $reference |
||
31 | * @param array $metadata |
||
32 | */ |
||
33 | 1 | public function __construct(string $reference, array $metadata = []) |
|
38 | |||
39 | /** |
||
40 | * Get reference to a resource |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | 1 | public function getReference(): string |
|
48 | |||
49 | /** |
||
50 | * Get extra metadata |
||
51 | * |
||
52 | * @return array |
||
53 | */ |
||
54 | 1 | public function getMetadata(): array |
|
58 | } |