@@ -523,7 +523,7 @@ |
||
523 | 523 | * Get the label for a resource, preferring 1. the given language 2. configured languages 3. any language. |
524 | 524 | * @param EasyRdf_Resource $res resource whose label to return |
525 | 525 | * @param string $lang preferred language |
526 | - * @return EasyRdf_Literal label as an EasyRdf_Literal object, or null if not found |
|
526 | + * @return string label as an EasyRdf_Literal object, or null if not found |
|
527 | 527 | */ |
528 | 528 | public function getResourceLabel($res, $lang) |
529 | 529 | { |
@@ -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)) { |
@@ -23,6 +23,9 @@ |
||
23 | 23 | } |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $name |
|
28 | + */ |
|
26 | 29 | private function getConstant($name, $default) |
27 | 30 | { |
28 | 31 | if (defined($name) && constant($name)) { |
@@ -114,7 +114,7 @@ |
||
114 | 114 | */ |
115 | 115 | public function getEnvLang() |
116 | 116 | { |
117 | - // get language from locale, same as used by gettext, set by Controller |
|
118 | - return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
117 | + // get language from locale, same as used by gettext, set by Controller |
|
118 | + return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
119 | 119 | } |
120 | 120 | } |
@@ -55,6 +55,7 @@ discard block |
||
55 | 55 | * @param Vocabulary $vocab |
56 | 56 | * @param EasyRdf_Resource $resource |
57 | 57 | * @param EasyRdf_Graph $graph |
58 | + * @param string|null $clang |
|
58 | 59 | */ |
59 | 60 | public function __construct($model, $vocab, $resource, $graph, $clang) |
60 | 61 | { |
@@ -512,6 +513,7 @@ discard block |
||
512 | 513 | |
513 | 514 | /** |
514 | 515 | * Gets the groups/arrays the concept belongs to. |
516 | + * @param boolean $includeArrays |
|
515 | 517 | */ |
516 | 518 | public function getReverseResources($includeArrays) { |
517 | 519 | $groups = array(); |
@@ -248,6 +248,10 @@ discard block |
||
248 | 248 | )); |
249 | 249 | } |
250 | 250 | |
251 | + /** |
|
252 | + * @param string|null $fromName |
|
253 | + * @param string|null $fromEmail |
|
254 | + */ |
|
251 | 255 | private function createFeedbackHeaders($fromName, $fromEmail, $toMail) |
252 | 256 | { |
253 | 257 | $headers = "MIME-Version: 1.0″ . '\r\n"; |
@@ -535,6 +539,7 @@ discard block |
||
535 | 539 | |
536 | 540 | /** |
537 | 541 | * Invokes a very generic errorpage. |
542 | + * @param string $message |
|
538 | 543 | */ |
539 | 544 | public function invokeGenericErrorPage($request, $message = null) |
540 | 545 | { |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * Returns information (as a graph) for one or more concept URIs |
430 | 430 | * @param mixed $uris concept URI (string) or array of URIs |
431 | 431 | * @param string|null $arrayClass the URI for thesaurus array class, or null if not used |
432 | - * @param \Vocabulary[]|null $vocabs vocabularies to target |
|
432 | + * @param Vocabulary[] $vocabs vocabularies to target |
|
433 | 433 | * @return \Concept[] |
434 | 434 | */ |
435 | 435 | public function queryConceptInfoGraph($uris, $arrayClass = null, $vocabs = array()) { |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | |
650 | 650 | /** |
651 | 651 | * Generate a VALUES clause for limiting the targeted graphs. |
652 | - * @param Vocabulary[]|null $vocabs array of Vocabulary objects to target |
|
652 | + * @param Vocabulary[] $vocabs array of Vocabulary objects to target |
|
653 | 653 | * @return string VALUES clause, or "" if not necessary to limit |
654 | 654 | */ |
655 | 655 | protected function formatValuesGraph($vocabs) { |
@@ -829,6 +829,7 @@ discard block |
||
829 | 829 | * @param string $searchLang language code used for matching labels (null means any language) |
830 | 830 | * @param string[] $props properties to target e.g. array('skos:prefLabel','skos:altLabel') |
831 | 831 | * @param boolean $unique restrict results to unique concepts (default: false) |
832 | + * @param string $filterGraph |
|
832 | 833 | * @return string sparql query |
833 | 834 | */ |
834 | 835 | protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $props, $unique, $filterGraph) |
@@ -1094,6 +1095,7 @@ discard block |
||
1094 | 1095 | /** |
1095 | 1096 | * Generates sparql query clauses used for creating the alphabetical index. |
1096 | 1097 | * @param string $letter the letter (or special class) to search for |
1098 | + * @param string $lang |
|
1097 | 1099 | * @return array of sparql query clause strings |
1098 | 1100 | */ |
1099 | 1101 | private function formatFilterConditions($letter, $lang) { |
@@ -1406,7 +1408,7 @@ discard block |
||
1406 | 1408 | /** |
1407 | 1409 | * Query a single transitive property of a concept. |
1408 | 1410 | * @param string $uri |
1409 | - * @param string $prop the name of the property eg. 'skos:broader'. |
|
1411 | + * @param string $props the name of the property eg. 'skos:broader'. |
|
1410 | 1412 | * @param string $lang |
1411 | 1413 | * @param integer $limit |
1412 | 1414 | * @param boolean $anylang if you want a label even when it isn't available in the language you requested. |
@@ -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,9 @@ discard block |
||
112 | 115 | return $parameters; |
113 | 116 | } |
114 | 117 | |
118 | + /** |
|
119 | + * @param Request $request |
|
120 | + */ |
|
115 | 121 | private function transformSearchResults($request, $results) |
116 | 122 | { |
117 | 123 | // before serializing to JSON, get rid of the Vocabulary object that came with each resource |
@@ -391,6 +397,10 @@ discard block |
||
391 | 397 | return $this->returnJson($ret); |
392 | 398 | } |
393 | 399 | |
400 | + /** |
|
401 | + * @param string $label |
|
402 | + * @param string $lang |
|
403 | + */ |
|
394 | 404 | private function findLookupHits($results, $label, $lang) |
395 | 405 | { |
396 | 406 | $hits = array(); |
@@ -452,6 +462,10 @@ discard block |
||
452 | 462 | return $hits; |
453 | 463 | } |
454 | 464 | |
465 | + /** |
|
466 | + * @param string $lang |
|
467 | + * @param string $label |
|
468 | + */ |
|
455 | 469 | private function transformLookupResults($lang, $hits, $label) |
456 | 470 | { |
457 | 471 | if (sizeof($hits) == 0) { |
@@ -521,6 +535,9 @@ discard block |
||
521 | 535 | return $this->returnJson($ret); |
522 | 536 | } |
523 | 537 | |
538 | + /** |
|
539 | + * @param Request $request |
|
540 | + */ |
|
524 | 541 | private function redirectToVocabData($request) { |
525 | 542 | $urls = $request->getVocab()->getConfig()->getDataURLs(); |
526 | 543 | if (sizeof($urls) == 0) { |
@@ -536,6 +553,9 @@ discard block |
||
536 | 553 | header("Location: " . $urls[$format]); |
537 | 554 | } |
538 | 555 | |
556 | + /** |
|
557 | + * @param string $format |
|
558 | + */ |
|
539 | 559 | private function returnDataResults($results, $format) { |
540 | 560 | if ($format == 'application/ld+json' || $format == 'application/json') { |
541 | 561 | // further compact JSON-LD document using a context |
@@ -626,6 +646,12 @@ discard block |
||
626 | 646 | return $this->returnJson($ret); |
627 | 647 | } |
628 | 648 | |
649 | + /** |
|
650 | + * @param string $uri |
|
651 | + * @param string $lang |
|
652 | + * @param string $propname |
|
653 | + * @param string $propuri |
|
654 | + */ |
|
629 | 655 | private function transformPropertyResults($uri, $lang, $objects, $propname, $propuri) |
630 | 656 | { |
631 | 657 | $results = array(); |
@@ -641,6 +667,14 @@ discard block |
||
641 | 667 | return $ret; |
642 | 668 | } |
643 | 669 | |
670 | + /** |
|
671 | + * @param string $uri |
|
672 | + * @param string $lang |
|
673 | + * @param string $tpropname |
|
674 | + * @param string $tpropuri |
|
675 | + * @param string $dpropname |
|
676 | + * @param string $dpropuri |
|
677 | + */ |
|
644 | 678 | private function transformTransitivePropertyResults($uri, $lang, $objects, $tpropname, $tpropuri, $dpropname, $dpropuri) |
645 | 679 | { |
646 | 680 | $results = array(); |
@@ -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 | { |