@@ -10,6 +10,9 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | class VocabularyCategory extends DataObject |
| 12 | 12 | { |
| 13 | + /** |
|
| 14 | + * @param Model $model |
|
| 15 | + */ |
|
| 13 | 16 | public function __construct($model, $resource) |
| 14 | 17 | { |
| 15 | 18 | if (!($model instanceof Model)) { |
@@ -55,6 +55,7 @@ |
||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Steps back, restoring the previous character or statement read() to the input buffer. |
| 58 | + * @param string $chars |
|
| 58 | 59 | */ |
| 59 | 60 | protected function unread($chars) |
| 60 | 61 | { |
@@ -3,6 +3,9 @@ |
||
| 3 | 3 | class LabelSkosXL extends DataObject |
| 4 | 4 | { |
| 5 | 5 | |
| 6 | + /** |
|
| 7 | + * @param Model $model |
|
| 8 | + */ |
|
| 6 | 9 | public function __construct($model, $resource) |
| 7 | 10 | { |
| 8 | 11 | parent::__construct($model, $resource); |
@@ -10,6 +10,11 @@ |
||
| 10 | 10 | /** property type */ |
| 11 | 11 | private $type; |
| 12 | 12 | |
| 13 | + /** |
|
| 14 | + * @param Model $model |
|
| 15 | + * @param Vocabulary $vocab |
|
| 16 | + * @param Resource $resource |
|
| 17 | + */ |
|
| 13 | 18 | public function __construct($model, $vocab, $resource, $literal, $prop) |
| 14 | 19 | { |
| 15 | 20 | parent::__construct($model, $vocab, $resource); |
@@ -74,6 +74,7 @@ discard block |
||
| 74 | 74 | * @param Vocabulary $vocab |
| 75 | 75 | * @param EasyRdf\Resource $resource |
| 76 | 76 | * @param EasyRdf\Graph $graph |
| 77 | + * @param string|null $clang |
|
| 77 | 78 | */ |
| 78 | 79 | public function __construct($model, $vocab, $resource, $graph, $clang) |
| 79 | 80 | { |
@@ -738,6 +739,7 @@ discard block |
||
| 738 | 739 | |
| 739 | 740 | /** |
| 740 | 741 | * Gets the groups/arrays the concept belongs to. |
| 742 | + * @param boolean $includeArrays |
|
| 741 | 743 | */ |
| 742 | 744 | private function getCollections($includeArrays) { |
| 743 | 745 | $groups = array(); |
@@ -169,6 +169,8 @@ |
||
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | 171 | * Return the mapping as a JSKOS-compatible array. |
| 172 | + * @param string $lang |
|
| 173 | + * @param string $hrefLink |
|
| 172 | 174 | * @return array |
| 173 | 175 | */ |
| 174 | 176 | public function asJskos($queryExVocabs = true, $lang = null, $hrefLink = null) |
@@ -266,6 +266,7 @@ discard block |
||
| 266 | 266 | |
| 267 | 267 | /** |
| 268 | 268 | * Returns skosmos:marcSourcecode value set in config.ttl. |
| 269 | + * @param string $lang |
|
| 269 | 270 | * @return string marcsource name |
| 270 | 271 | */ |
| 271 | 272 | public function getMarcSourceCode($lang = null) |
@@ -275,7 +276,7 @@ discard block |
||
| 275 | 276 | |
| 276 | 277 | /** |
| 277 | 278 | * Returns a boolean value set in the config.ttl config. |
| 278 | - * @return array array of concept class URIs (can be empty) |
|
| 279 | + * @return string[] array of concept class URIs (can be empty) |
|
| 279 | 280 | */ |
| 280 | 281 | public function getIndexClasses() |
| 281 | 282 | { |
@@ -284,7 +285,7 @@ discard block |
||
| 284 | 285 | |
| 285 | 286 | /** |
| 286 | 287 | * Returns skosmos:externalProperty values set in the config.ttl config. |
| 287 | - * @return array array of external property URIs (can be empty) |
|
| 288 | + * @return string[] array of external property URIs (can be empty) |
|
| 288 | 289 | */ |
| 289 | 290 | public function getExtProperties() |
| 290 | 291 | { |
@@ -410,6 +411,7 @@ discard block |
||
| 410 | 411 | |
| 411 | 412 | /** |
| 412 | 413 | * Returns the vocabulary dc:type value(s) with their labels and uris, if set in the vocabulary configuration. |
| 414 | + * @param string $lang |
|
| 413 | 415 | * @return array of objects or an empty array |
| 414 | 416 | */ |
| 415 | 417 | public function getTypes($lang = null) |
@@ -23,6 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Initializes the Model object. |
| 26 | + * @param Model $model |
|
| 26 | 27 | */ |
| 27 | 28 | public function __construct($model) |
| 28 | 29 | { |
@@ -290,7 +291,7 @@ discard block |
||
| 290 | 291 | * Sends HTTP headers. Simply calls PHP built-in header function. But being |
| 291 | 292 | * a function here, it can easily be tested/mocked. |
| 292 | 293 | * |
| 293 | - * @param $header string header to be sent |
|
| 294 | + * @param string $header string header to be sent |
|
| 294 | 295 | */ |
| 295 | 296 | protected function sendHeader($header) |
| 296 | 297 | { |
@@ -97,6 +97,9 @@ discard block |
||
| 97 | 97 | return $this->returnJson($ret); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | + /** |
|
| 101 | + * @param Request $request |
|
| 102 | + */ |
|
| 100 | 103 | private function constructSearchParameters($request) |
| 101 | 104 | { |
| 102 | 105 | $parameters = new ConceptSearchParameters($request, $this->model->getConfig(), true); |
@@ -112,6 +115,10 @@ discard block |
||
| 112 | 115 | return $parameters; |
| 113 | 116 | } |
| 114 | 117 | |
| 118 | + /** |
|
| 119 | + * @param Request $request |
|
| 120 | + * @param ConceptSearchParameters $parameters |
|
| 121 | + */ |
|
| 115 | 122 | private function transformSearchResults($request, $results, $parameters) |
| 116 | 123 | { |
| 117 | 124 | // before serializing to JSON, get rid of the Vocabulary object that came with each resource |
@@ -407,6 +414,10 @@ discard block |
||
| 407 | 414 | return $this->returnJson($ret); |
| 408 | 415 | } |
| 409 | 416 | |
| 417 | + /** |
|
| 418 | + * @param string $label |
|
| 419 | + * @param string $lang |
|
| 420 | + */ |
|
| 410 | 421 | private function findLookupHits($results, $label, $lang) |
| 411 | 422 | { |
| 412 | 423 | $hits = array(); |
@@ -468,6 +479,9 @@ discard block |
||
| 468 | 479 | return $hits; |
| 469 | 480 | } |
| 470 | 481 | |
| 482 | + /** |
|
| 483 | + * @param string $lang |
|
| 484 | + */ |
|
| 471 | 485 | private function transformLookupResults($lang, $hits) |
| 472 | 486 | { |
| 473 | 487 | if (sizeof($hits) == 0) { |
@@ -539,6 +553,9 @@ discard block |
||
| 539 | 553 | return $this->returnJson($ret); |
| 540 | 554 | } |
| 541 | 555 | |
| 556 | + /** |
|
| 557 | + * @param Request $request |
|
| 558 | + */ |
|
| 542 | 559 | private function redirectToVocabData($request) { |
| 543 | 560 | $urls = $request->getVocab()->getConfig()->getDataURLs(); |
| 544 | 561 | if (sizeof($urls) == 0) { |
@@ -564,6 +581,10 @@ discard block |
||
| 564 | 581 | } |
| 565 | 582 | } |
| 566 | 583 | |
| 584 | + /** |
|
| 585 | + * @param string $results |
|
| 586 | + * @param string $format |
|
| 587 | + */ |
|
| 567 | 588 | private function returnDataResults($results, $format) { |
| 568 | 589 | if ($format == 'application/ld+json' || $format == 'application/json') { |
| 569 | 590 | // further compact JSON-LD document using a context |
@@ -700,6 +721,12 @@ discard block |
||
| 700 | 721 | return $this->returnJson($ret); |
| 701 | 722 | } |
| 702 | 723 | |
| 724 | + /** |
|
| 725 | + * @param string $uri |
|
| 726 | + * @param string $lang |
|
| 727 | + * @param string $propname |
|
| 728 | + * @param string $propuri |
|
| 729 | + */ |
|
| 703 | 730 | private function transformPropertyResults($uri, $lang, $objects, $propname, $propuri) |
| 704 | 731 | { |
| 705 | 732 | $results = array(); |
@@ -714,6 +741,14 @@ discard block |
||
| 714 | 741 | ); |
| 715 | 742 | } |
| 716 | 743 | |
| 744 | + /** |
|
| 745 | + * @param string $uri |
|
| 746 | + * @param string $lang |
|
| 747 | + * @param string $tpropname |
|
| 748 | + * @param string $tpropuri |
|
| 749 | + * @param string $dpropname |
|
| 750 | + * @param string $dpropuri |
|
| 751 | + */ |
|
| 717 | 752 | private function transformTransitivePropertyResults($uri, $lang, $objects, $tpropname, $tpropuri, $dpropname, $dpropuri) |
| 718 | 753 | { |
| 719 | 754 | $results = array(); |