1 | <?php |
||
45 | class Thing |
||
46 | { |
||
47 | /** |
||
48 | * Resource type |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $type; |
||
53 | /** |
||
54 | * Resource vocabulary |
||
55 | * |
||
56 | * @var Vocabulary |
||
57 | */ |
||
58 | protected $vocabulary; |
||
59 | /** |
||
60 | * Resource ID |
||
61 | * |
||
62 | * @var string|null |
||
63 | */ |
||
64 | protected $id = null; |
||
65 | |||
66 | /** |
||
67 | * Thing constructor |
||
68 | * |
||
69 | * @param string $type Resource type |
||
70 | * @param Vocabulary $vocabulary Vocabulary in use |
||
71 | * @param null|string $id Resource id |
||
72 | */ |
||
73 | 2 | public function __construct($type, Vocabulary $vocabulary, $id = null) |
|
87 | |||
88 | /** |
||
89 | * Return the resource type |
||
90 | * |
||
91 | * @return string Resource type |
||
92 | */ |
||
93 | public function getType() |
||
97 | |||
98 | /** |
||
99 | * Return the vocabulary in use |
||
100 | * |
||
101 | * @return Vocabulary Vocabulary |
||
102 | */ |
||
103 | public function getVocabulary() |
||
107 | |||
108 | /** |
||
109 | * Return the resource ID |
||
110 | * |
||
111 | * @return null|string Resource ID |
||
112 | */ |
||
113 | public function getId() |
||
117 | } |
||
118 |