1 | <?php |
||
48 | class Property implements PropertyInterface |
||
49 | { |
||
50 | /** |
||
51 | * Property name |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $name; |
||
56 | /** |
||
57 | * Vocabulary |
||
58 | * |
||
59 | * @var VocabularyInterface |
||
60 | */ |
||
61 | protected $vocabulary; |
||
62 | /** |
||
63 | * Property value |
||
64 | * |
||
65 | * @var string|ThingInterface |
||
66 | */ |
||
67 | protected $value; |
||
68 | /** |
||
69 | * Resource ID |
||
70 | * |
||
71 | * @var string|null |
||
72 | */ |
||
73 | protected $resourceId = null; |
||
74 | |||
75 | /** |
||
76 | * Property constructor |
||
77 | * |
||
78 | * @param string $name Property name |
||
79 | * @param VocabularyInterface $vocabulary Property vocabulary |
||
80 | * @param string|ThingInterface $value Property value |
||
81 | */ |
||
82 | 7 | public function __construct($name, VocabularyInterface $vocabulary, $value, $resourceId = null) |
|
89 | |||
90 | /** |
||
91 | * Return the property name |
||
92 | * |
||
93 | * @return string Property name |
||
94 | */ |
||
95 | 6 | public function getName() |
|
99 | |||
100 | /** |
||
101 | * Return the property vocabulary |
||
102 | * |
||
103 | * @return VocabularyInterface Property vocabulary |
||
104 | */ |
||
105 | 6 | public function getVocabulary() |
|
109 | |||
110 | /** |
||
111 | * Return the property value |
||
112 | * |
||
113 | * @return string|ThingInterface Property value |
||
114 | */ |
||
115 | 3 | public function getValue() |
|
119 | |||
120 | /** |
||
121 | * Return the property resource ID |
||
122 | * |
||
123 | * @return null|string Property resource ID |
||
124 | */ |
||
125 | 1 | public function getResourceId() |
|
129 | } |
||
130 |