1 | <?php |
||
50 | class Property implements PropertyInterface |
||
51 | { |
||
52 | /** |
||
53 | * Property name |
||
54 | * |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $name; |
||
58 | /** |
||
59 | * Vocabulary |
||
60 | * |
||
61 | * @var VocabularyInterface |
||
62 | */ |
||
63 | protected $vocabulary; |
||
64 | /** |
||
65 | * Property value |
||
66 | * |
||
67 | * @var string|ThingInterface |
||
68 | */ |
||
69 | protected $value; |
||
70 | /** |
||
71 | * Resource ID |
||
72 | * |
||
73 | * @var string|null |
||
74 | */ |
||
75 | protected $resourceId = null; |
||
76 | |||
77 | /** |
||
78 | * Property constructor |
||
79 | * |
||
80 | * @param string $name Property name |
||
81 | * @param VocabularyInterface $vocabulary Property vocabulary |
||
82 | * @param string|ThingInterface $value Property value |
||
83 | */ |
||
84 | 17 | public function __construct($name, VocabularyInterface $vocabulary, $value, $resourceId = null) |
|
91 | |||
92 | /** |
||
93 | * Return the property name |
||
94 | * |
||
95 | * @return string Property name |
||
96 | */ |
||
97 | 15 | public function getName() |
|
101 | |||
102 | /** |
||
103 | * Return the property vocabulary |
||
104 | * |
||
105 | * @return VocabularyInterface Property vocabulary |
||
106 | */ |
||
107 | 15 | public function getVocabulary() |
|
111 | |||
112 | /** |
||
113 | * Return the property value |
||
114 | * |
||
115 | * @return string|ThingInterface Property value |
||
116 | */ |
||
117 | 10 | public function getValue() |
|
121 | |||
122 | /** |
||
123 | * Return the property resource ID |
||
124 | * |
||
125 | * @return null|string Property resource ID |
||
126 | */ |
||
127 | 1 | public function getResourceId() |
|
131 | |||
132 | /** |
||
133 | * Return as IRI |
||
134 | * |
||
135 | * @return Iri Property IRI |
||
136 | */ |
||
137 | 15 | public function toIri() |
|
141 | } |
||
142 |