Total Complexity | 12 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
3 | class LabelSkosXL extends DataObject |
||
4 | { |
||
5 | |||
6 | public function __construct($model, $resource) |
||
7 | { |
||
8 | parent::__construct($model, $resource); |
||
9 | } |
||
10 | |||
11 | public function getPrefLabel() { |
||
12 | $label = null; |
||
13 | $labels = $this->resource->allResources('skosxl:prefLabel'); |
||
14 | foreach($labels as $labres) { |
||
15 | $label = $labres->getLiteral('skosxl:literalForm'); |
||
16 | if ($label->getLang() == $this->clang) { |
||
|
|||
17 | return $label; |
||
18 | } |
||
19 | } |
||
20 | return $label; |
||
21 | } |
||
22 | |||
23 | public function getProperties() { |
||
35 | } |
||
36 | |||
37 | public function getLang() { |
||
38 | return $this->resource->getLiteral('skosxl:literalForm')->getLang(); |
||
39 | } |
||
40 | |||
41 | public function getLiteral() { |
||
42 | return $this->resource->getLiteral('skosxl:literalForm')->getValue(); |
||
43 | } |
||
44 | |||
45 | public function __toString() { |
||
47 | } |
||
48 | } |
||
49 |