@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | } |
54 | 54 | // We need to check all the labels in case one of them matches a subtag of the current language |
55 | 55 | if ($this->resource->allLiterals('skos:prefLabel')) { |
56 | - foreach($this->resource->allLiterals('skos:prefLabel') as $label) { |
|
56 | + foreach ($this->resource->allLiterals('skos:prefLabel') as $label) { |
|
57 | 57 | // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language |
58 | - if ($label !== null && strpos($label->getLang(), $fallback . '-') === 0) { |
|
58 | + if ($label !== null && strpos($label->getLang(), $fallback.'-') === 0) { |
|
59 | 59 | return EasyRdf\Literal::create($label, $fallback); |
60 | 60 | } |
61 | 61 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | public function getReifiedPropertyValues() { |
157 | 157 | $ret = array(); |
158 | 158 | $props = $this->resource->propertyUris(); |
159 | - foreach($props as $prop) { |
|
159 | + foreach ($props as $prop) { |
|
160 | 160 | $prop = (EasyRdf\RdfNamespace::shorten($prop) !== null) ? EasyRdf\RdfNamespace::shorten($prop) : $prop; |
161 | 161 | $propkey = str_starts_with($prop, 'dc11:') ? |
162 | 162 | str_replace('dc11:', 'dc:', $prop) : $prop; |
@@ -71,11 +71,11 @@ |
||
71 | 71 | if ((!isset($term) || strlen(trim($term)) === 0) && $this->rest) |
72 | 72 | $term = $this->request->getQueryParamRaw('label'); |
73 | 73 | $term = trim(strval($term)); // surrounding whitespace is not considered significant |
74 | - $term = Normalizer::normalize( $term, Normalizer::FORM_C ); //Normalize decomposed unicode characters #1184 |
|
74 | + $term = Normalizer::normalize($term, Normalizer::FORM_C); //Normalize decomposed unicode characters #1184 |
|
75 | 75 | if ($this->rest) { |
76 | 76 | return $term; |
77 | 77 | } |
78 | - return strpos($term, "*") === false ? $term . "*" : $term; // default to prefix search |
|
78 | + return strpos($term, "*") === false ? $term."*" : $term; // default to prefix search |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function getContentLang() |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | return $this->resource->label($fallback); |
143 | 143 | } |
144 | 144 | // We need to check all the labels in case one of them matches a subtag of the current language |
145 | - foreach($this->resource->allLiterals('skos:prefLabel') as $label) { |
|
145 | + foreach ($this->resource->allLiterals('skos:prefLabel') as $label) { |
|
146 | 146 | // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language |
147 | - if ($label !== null && strpos($label->getLang(), $fallback . '-') === 0) { |
|
147 | + if ($label !== null && strpos($label->getLang(), $fallback.'-') === 0) { |
|
148 | 148 | return EasyRdf\Literal::create($label, $fallback); |
149 | 149 | } |
150 | 150 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | public function getXlLabel() |
173 | 173 | { |
174 | 174 | $labels = $this->resource->allResources('skosxl:prefLabel'); |
175 | - foreach($labels as $labres) { |
|
175 | + foreach ($labels as $labres) { |
|
176 | 176 | $label = $labres->getLiteral('skosxl:literalForm'); |
177 | 177 | if ($label !== null && $label->getLang() == $this->clang) { |
178 | 178 | return new LabelSkosXL($this->model, $labres); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | // catch external subjects that have $res as object |
280 | 280 | $extSubjects = $exGraph->resourcesMatching("schema:about", $res); |
281 | 281 | |
282 | - $propList = array_unique(array_merge( |
|
282 | + $propList = array_unique(array_merge( |
|
283 | 283 | $this->DEFAULT_EXT_PROPERTIES, |
284 | 284 | $this->getVocab()->getConfig()->getExtProperties(), |
285 | 285 | $this->getVocab()->getConfig()->getPluginRegister()->getExtProperties() |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | * @param string[] $seen Processed resources so far |
305 | 305 | * @param string[] $props (optional) limit to these property URIs |
306 | 306 | */ |
307 | - private function addExternalTriplesToGraph($res, &$seen, $props=null) |
|
307 | + private function addExternalTriplesToGraph($res, &$seen, $props = null) |
|
308 | 308 | { |
309 | 309 | if (array_key_exists($res->getUri(), $seen) && $seen[$res->getUri()] === 0) { |
310 | 310 | return; |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | */ |
335 | 335 | private function addPropertyValues($res, $prop, &$seen) |
336 | 336 | { |
337 | - $resList = $res->allResources('<' . $prop . '>'); |
|
337 | + $resList = $res->allResources('<'.$prop.'>'); |
|
338 | 338 | |
339 | 339 | foreach ($resList as $res2) { |
340 | 340 | if ($res2->isBNode()) { |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | $this->addResourceReifications($res, $prop, $res2, $seen); |
345 | 345 | } |
346 | 346 | |
347 | - $litList = $res->allLiterals('<' . $prop . '>'); |
|
347 | + $litList = $res->allLiterals('<'.$prop.'>'); |
|
348 | 348 | |
349 | 349 | foreach ($litList as $lit) { |
350 | 350 | $this->graph->addLiteral($res, $prop, $lit); |
@@ -532,15 +532,15 @@ discard block |
||
532 | 532 | // if not found in current vocabulary, look up in the default graph to be able |
533 | 533 | // to read an ontology loaded in a separate graph |
534 | 534 | // note that this imply that the property has an rdf:type declared for the query to work |
535 | - if(!$is_well_known && !$proplabel) { |
|
535 | + if (!$is_well_known && !$proplabel) { |
|
536 | 536 | $envLangLabels = $this->model->getDefaultSparql()->queryLabel($longUri, $this->getEnvLang()); |
537 | 537 | |
538 | 538 | $defaultPropLabel = $this->model->getDefaultSparql()->queryLabel($longUri, ''); |
539 | 539 | |
540 | - if($envLangLabels) { |
|
540 | + if ($envLangLabels) { |
|
541 | 541 | $proplabel = $envLangLabels[$this->getEnvLang()]; |
542 | 542 | } else { |
543 | - if($defaultPropLabel) { |
|
543 | + if ($defaultPropLabel) { |
|
544 | 544 | $proplabel = $defaultPropLabel['']; |
545 | 545 | } |
546 | 546 | } |
@@ -553,12 +553,12 @@ discard block |
||
553 | 553 | } |
554 | 554 | |
555 | 555 | // also look up superprops in the default graph if not found in current vocabulary |
556 | - if(!$is_well_known && (!$superprops || empty($superprops))) { |
|
556 | + if (!$is_well_known && (!$superprops || empty($superprops))) { |
|
557 | 557 | $superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri); |
558 | 558 | } |
559 | 559 | |
560 | 560 | // we're reading only one super property, even if there are multiple ones |
561 | - $superprop = ($superprops)?$superprops[0]:null; |
|
561 | + $superprop = ($superprops) ? $superprops[0] : null; |
|
562 | 562 | if ($superprop) { |
563 | 563 | $superprop = EasyRdf\RdfNamespace::shorten($superprop) ? EasyRdf\RdfNamespace::shorten($superprop) : $superprop; |
564 | 564 | } |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | } |
572 | 572 | |
573 | 573 | // searching for subproperties of literals too |
574 | - if($superprops) { |
|
574 | + if ($superprops) { |
|
575 | 575 | foreach ($superprops as $subi) { |
576 | 576 | $suburi = EasyRdf\RdfNamespace::shorten($subi) ? EasyRdf\RdfNamespace::shorten($subi) : $subi; |
577 | 577 | $duplicates[$suburi] = $prop; |
@@ -732,14 +732,14 @@ discard block |
||
732 | 732 | |
733 | 733 | // making a human readable string from the timestamps |
734 | 734 | if ($created != '') { |
735 | - $ret = gettext('skosmos:created') . ' ' . (Punic\Calendar::formatDate($created, 'short', $this->getEnvLang())); |
|
735 | + $ret = gettext('skosmos:created').' '.(Punic\Calendar::formatDate($created, 'short', $this->getEnvLang())); |
|
736 | 736 | } |
737 | 737 | |
738 | 738 | if ($modified != '') { |
739 | 739 | if ($created != '') { |
740 | - $ret .= ', ' . gettext('skosmos:modified') . ' ' . (Punic\Calendar::formatDate($modified, 'short', $this->getEnvLang())); |
|
740 | + $ret .= ', '.gettext('skosmos:modified').' '.(Punic\Calendar::formatDate($modified, 'short', $this->getEnvLang())); |
|
741 | 741 | } else { |
742 | - $ret .= ' ' . ucfirst(gettext('skosmos:modified')) . ' ' . (Punic\Calendar::formatDate($modified, 'short', $this->getEnvLang())); |
|
742 | + $ret .= ' '.ucfirst(gettext('skosmos:modified')).' '.(Punic\Calendar::formatDate($modified, 'short', $this->getEnvLang())); |
|
743 | 743 | } |
744 | 744 | |
745 | 745 | } |
@@ -747,12 +747,12 @@ discard block |
||
747 | 747 | trigger_error($e->getMessage(), E_USER_WARNING); |
748 | 748 | $ret = ''; |
749 | 749 | if ($this->resource->get('dc:modified')) { |
750 | - $modified = (string) $this->resource->get('dc:modified'); |
|
751 | - $ret = gettext('skosmos:modified') . ' ' . $modified; |
|
750 | + $modified = (string)$this->resource->get('dc:modified'); |
|
751 | + $ret = gettext('skosmos:modified').' '.$modified; |
|
752 | 752 | } |
753 | 753 | if ($this->resource->get('dc:created')) { |
754 | - $created .= (string) $this->resource->get('dc:created'); |
|
755 | - $ret .= ' ' . gettext('skosmos:created') . ' ' . $created; |
|
754 | + $created .= (string)$this->resource->get('dc:created'); |
|
755 | + $ret .= ' '.gettext('skosmos:created').' '.$created; |
|
756 | 756 | } |
757 | 757 | } |
758 | 758 | return $ret; |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | $groups[$collLabel] = array($group); |
825 | 825 | |
826 | 826 | $res = $collection; |
827 | - while($super = $this->graph->resourcesMatching('skos:member', $res)) { |
|
827 | + while ($super = $this->graph->resourcesMatching('skos:member', $res)) { |
|
828 | 828 | foreach ($super as $res) { |
829 | 829 | $superprop = new ConceptPropertyValue($this->model, $this->vocab, $res, 'skosmos:memberOfSuper', $this->clang); |
830 | 830 | array_unshift($groups[$collLabel], $superprop); |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | foreach ($labels as $lit) { |
871 | 871 | // filtering away subsets of the current language eg. en vs en-GB |
872 | 872 | $langCode = strval($lit->getLang()); |
873 | - if ($langCode != $this->clang && strpos($langCode, $this->getEnvLang() . '-') !== 0) { |
|
873 | + if ($langCode != $this->clang && strpos($langCode, $this->getEnvLang().'-') !== 0) { |
|
874 | 874 | $ret[$langCode][$key][] = new ConceptPropertyValueLiteral($this->model, $this->vocab, $this->resource, $lit, $prop); |
875 | 875 | } |
876 | 876 | } |
@@ -961,10 +961,10 @@ discard block |
||
961 | 961 | } |
962 | 962 | else if ($context[$vocabPrefix] !== $vocabUriSpace) { |
963 | 963 | $i = 2; |
964 | - while (isset($context[$vocabPrefix . $i]) && $context[$vocabPrefix . $i] !== $vocabUriSpace) { |
|
964 | + while (isset($context[$vocabPrefix.$i]) && $context[$vocabPrefix.$i] !== $vocabUriSpace) { |
|
965 | 965 | $i += 1; |
966 | 966 | } |
967 | - $context[$vocabPrefix . $i] = $vocabUriSpace; |
|
967 | + $context[$vocabPrefix.$i] = $vocabUriSpace; |
|
968 | 968 | } |
969 | 969 | } |
970 | 970 | $compactJsonLD = \ML\JsonLD\JsonLD::compact($this->graph->serialise('jsonld'), json_encode($context)); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | return Punic\Calendar::formatDate($val, 'short'); |
70 | 70 | } catch (Exception $e) { |
71 | 71 | trigger_error($e->getMessage(), E_USER_WARNING); |
72 | - return (string) $this->literal; |
|
72 | + return (string)$this->literal; |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | return $this->literal->getValue(); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | { |
96 | 96 | $graph = $this->resource->getGraph(); |
97 | 97 | $labelResources = $graph->resourcesMatching('skosxl:literalForm', $this->literal); |
98 | - foreach($labelResources as $labres) { |
|
98 | + foreach ($labelResources as $labres) { |
|
99 | 99 | $xlLabel = new LabelSkosXL($this->model, $labres); |
100 | 100 | if ($xlLabel->getLang() == $this->getLang()) { |
101 | 101 | return $xlLabel; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | } |
10 | 10 | require_once 'vendor/autoload.php'; |
11 | 11 | } catch (Exception $e) { |
12 | - echo "Error: " . $e->getMessage(); |
|
12 | + echo "Error: ".$e->getMessage(); |
|
13 | 13 | return; |
14 | 14 | } |
15 | 15 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | // if language code missing, redirect to guessed language |
28 | 28 | // in any case, redirect to <lang>/ |
29 | 29 | $lang = sizeof($parts) == 2 && $parts[1] !== '' ? $parts[1] : $controller->guessLanguage($request); |
30 | - header("Location: " . $lang . "/"); |
|
30 | + header("Location: ".$lang."/"); |
|
31 | 31 | } else { |
32 | 32 | if (array_key_exists($parts[1], $config->getLanguages())) { // global pages |
33 | 33 | $request->setLang($parts[1]); |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | } |
57 | 57 | if (sizeof($parts) == 3) { // language code missing |
58 | 58 | $lang = $controller->guessLanguage($request); |
59 | - $newurl = $controller->getBaseHref() . $vocab . "/" . $lang . "/"; |
|
60 | - header("Location: " . $newurl); |
|
59 | + $newurl = $controller->getBaseHref().$vocab."/".$lang."/"; |
|
60 | + header("Location: ".$newurl); |
|
61 | 61 | } else { |
62 | 62 | if (array_key_exists($parts[2], $config->getLanguages())) { |
63 | 63 | $lang = $parts[2]; |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | } |
99 | 99 | } else { // language code missing, redirect to some language version |
100 | 100 | $lang = $controller->guessLanguage($request, $vocab); |
101 | - $newurl = $controller->getBaseHref() . $vocab . "/" . $lang . "/" . implode('/', array_slice($parts, 2)); |
|
101 | + $newurl = $controller->getBaseHref().$vocab."/".$lang."/".implode('/', array_slice($parts, 2)); |
|
102 | 102 | $qs = $request->getServerConstant('QUERY_STRING'); |
103 | 103 | if ($qs) { |
104 | - $newurl .= "?" . $qs; |
|
104 | + $newurl .= "?".$qs; |
|
105 | 105 | } |
106 | 106 | header("Location: $newurl"); |
107 | 107 | } |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | protected function query($query) { |
89 | 89 | $queryId = sprintf("%05d", rand(0, 99999)); |
90 | 90 | $logger = $this->model->getLogger(); |
91 | - $logger->info("[qid $queryId] SPARQL query:\n" . $this->generateQueryPrefixes($query) . "\n$query\n"); |
|
91 | + $logger->info("[qid $queryId] SPARQL query:\n".$this->generateQueryPrefixes($query)."\n$query\n"); |
|
92 | 92 | $starttime = microtime(true); |
93 | 93 | $result = $this->client->query($query); |
94 | 94 | $elapsed = intval(round((microtime(true) - $starttime) * 1000)); |
95 | - if(method_exists($result, 'numRows')) { |
|
95 | + if (method_exists($result, 'numRows')) { |
|
96 | 96 | $numRows = $result->numRows(); |
97 | 97 | $logger->info("[qid $queryId] result: $numRows rows returned in $elapsed ms"); |
98 | 98 | } else { // graph result |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @param Vocabulary[]|null $vocabs |
109 | 109 | * @return string |
110 | 110 | */ |
111 | - protected function generateFromClause($vocabs=null) { |
|
111 | + protected function generateFromClause($vocabs = null) { |
|
112 | 112 | $clause = ''; |
113 | 113 | if (!$vocabs) { |
114 | 114 | return $this->graph !== '?graph' && $this->graph !== NULL ? "FROM <$this->graph>" : ''; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | $quote_string = function($val) { return "'$val'"; }; |
252 | 252 | $quoted_values = array_map($quote_string, $langs); |
253 | - $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
253 | + $langFilter = "FILTER(?lang IN (".implode(',', $quoted_values)."))"; |
|
254 | 254 | |
255 | 255 | $values = $this->formatValues('?type', $classes, 'uri'); |
256 | 256 | $valuesProp = $this->formatValues('?prop', $props, null); |
@@ -694,9 +694,9 @@ discard block |
||
694 | 694 | $conceptscheme['title'] = $row->title->getValue(); |
695 | 695 | } |
696 | 696 | // add dct:subject and their labels in the result |
697 | - if(isset($row->domain) && isset($row->domainLabel)){ |
|
698 | - $conceptscheme['subject']['uri']=$row->domain->getURI(); |
|
699 | - $conceptscheme['subject']['prefLabel']=$row->domainLabel->getValue(); |
|
697 | + if (isset($row->domain) && isset($row->domainLabel)) { |
|
698 | + $conceptscheme['subject']['uri'] = $row->domain->getURI(); |
|
699 | + $conceptscheme['subject']['prefLabel'] = $row->domainLabel->getValue(); |
|
700 | 700 | } |
701 | 701 | |
702 | 702 | $ret[$row->cs->getURI()] = $conceptscheme; |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | $values[] = "<$graph>"; |
764 | 764 | } |
765 | 765 | if (count($values)) { |
766 | - return "FILTER (?graph IN (" . implode(',', $values) . "))"; |
|
766 | + return "FILTER (?graph IN (".implode(',', $values)."))"; |
|
767 | 767 | } |
768 | 768 | } |
769 | 769 | |
@@ -774,16 +774,16 @@ discard block |
||
774 | 774 | * @return string sparql query clauses |
775 | 775 | */ |
776 | 776 | protected function formatLimitAndOffset($limit, $offset) { |
777 | - $limit = ($limit) ? 'LIMIT ' . $limit : ''; |
|
778 | - $offset = ($offset) ? 'OFFSET ' . $offset : ''; |
|
777 | + $limit = ($limit) ? 'LIMIT '.$limit : ''; |
|
778 | + $offset = ($offset) ? 'OFFSET '.$offset : ''; |
|
779 | 779 | // eliminating whitespace and line changes when the conditions aren't needed. |
780 | 780 | $limitandoffset = ''; |
781 | 781 | if ($limit && $offset) { |
782 | - $limitandoffset = "\n" . $limit . "\n" . $offset; |
|
782 | + $limitandoffset = "\n".$limit."\n".$offset; |
|
783 | 783 | } elseif ($limit) { |
784 | - $limitandoffset = "\n" . $limit; |
|
784 | + $limitandoffset = "\n".$limit; |
|
785 | 785 | } elseif ($offset) { |
786 | - $limitandoffset = "\n" . $offset; |
|
786 | + $limitandoffset = "\n".$offset; |
|
787 | 787 | } |
788 | 788 | |
789 | 789 | return $limitandoffset; |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | * @param string|null $distinguisher SPARQL property path from concept to distinguisher object in case of shared prefLabels |
923 | 923 | * @return string sparql query |
924 | 924 | */ |
925 | - protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $props, $unique, $filterGraph, $distinguisher=null) |
|
925 | + protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $props, $unique, $filterGraph, $distinguisher = null) |
|
926 | 926 | { |
927 | 927 | $valuesProp = $this->formatValues('?prop', $props); |
928 | 928 | $textcond = $this->generateConceptSearchQueryCondition($term, $searchLang); |
@@ -936,31 +936,31 @@ discard block |
||
936 | 936 | // if search language and UI/display language differ, must also consider case where there is no prefLabel in |
937 | 937 | // the display language; in that case, should use the label with the same language as the matched label |
938 | 938 | $labelcondFallback = ($searchLang != $lang) ? |
939 | - "OPTIONAL { # in case previous OPTIONAL block gives no labels\n" . |
|
939 | + "OPTIONAL { # in case previous OPTIONAL block gives no labels\n". |
|
940 | 940 | "?s skos:prefLabel ?label . FILTER (LANGMATCHES(LANG(?label), LANG(?match))) }" : ""; |
941 | 941 | |
942 | 942 | // Including the labels if there is no query term given. |
943 | 943 | if ($rawterm === '') { |
944 | 944 | $labelClause = "?s skos:prefLabel ?label ."; |
945 | - $labelClause = ($lang) ? $labelClause . " FILTER (LANGMATCHES(LANG(?label), '$lang'))" : $labelClause . ""; |
|
946 | - return $labelClause . " BIND(?label AS ?match)"; |
|
945 | + $labelClause = ($lang) ? $labelClause." FILTER (LANGMATCHES(LANG(?label), '$lang'))" : $labelClause.""; |
|
946 | + return $labelClause." BIND(?label AS ?match)"; |
|
947 | 947 | } |
948 | 948 | |
949 | 949 | $distinguishercondLabel = "FILTER (LANG(?distLabel) = LANG(?label))"; |
950 | 950 | // Only include distinguisher labels in case of a shared prefLabel |
951 | 951 | $distinguisherClause = $distinguisher ? |
952 | - "OPTIONAL {\n" . |
|
953 | - " ?s skos:prefLabel ?label . ?s2 skos:prefLabel ?label . FILTER(?s2 != ?s)\n" . |
|
954 | - " ?s $distinguisher ?distinguisher.\n" . |
|
955 | - " FILTER (!isLiteral(?distinguisher) || (LANG(?distinguisher) = LANG(?label)))" . |
|
956 | - " OPTIONAL {\n" . |
|
957 | - " ?distinguisher skos:prefLabel ?distLabel .\n" . |
|
958 | - " $distinguishercondLabel\n" . |
|
959 | - " }\n" . |
|
960 | - " OPTIONAL {\n" . |
|
961 | - " ?distinguisher rdfs:label ?distLabel .\n" . |
|
962 | - " $distinguishercondLabel\n" . |
|
963 | - " }\n" . |
|
952 | + "OPTIONAL {\n". |
|
953 | + " ?s skos:prefLabel ?label . ?s2 skos:prefLabel ?label . FILTER(?s2 != ?s)\n". |
|
954 | + " ?s $distinguisher ?distinguisher.\n". |
|
955 | + " FILTER (!isLiteral(?distinguisher) || (LANG(?distinguisher) = LANG(?label)))". |
|
956 | + " OPTIONAL {\n". |
|
957 | + " ?distinguisher skos:prefLabel ?distLabel .\n". |
|
958 | + " $distinguishercondLabel\n". |
|
959 | + " }\n". |
|
960 | + " OPTIONAL {\n". |
|
961 | + " ?distinguisher rdfs:label ?distLabel .\n". |
|
962 | + " $distinguishercondLabel\n". |
|
963 | + " }\n". |
|
964 | 964 | "} BIND(COALESCE(?distLabel,STR(?distinguisher)) AS ?distcoal) " : ""; |
965 | 965 | |
966 | 966 | /* |
@@ -1033,20 +1033,20 @@ discard block |
||
1033 | 1033 | $schemecond = ''; |
1034 | 1034 | if (!empty($schemes)) { |
1035 | 1035 | $conditions = array(); |
1036 | - foreach($schemes as $scheme) { |
|
1036 | + foreach ($schemes as $scheme) { |
|
1037 | 1037 | $conditions[] = "{?s skos:inScheme <$scheme>}"; |
1038 | 1038 | } |
1039 | - $schemecond = '{'.implode(" UNION ",$conditions).'}'; |
|
1039 | + $schemecond = '{'.implode(" UNION ", $conditions).'}'; |
|
1040 | 1040 | } |
1041 | - $filterDeprecated=""; |
|
1041 | + $filterDeprecated = ""; |
|
1042 | 1042 | //show or hide deprecated concepts |
1043 | - if(!$showDeprecated){ |
|
1044 | - $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
1043 | + if (!$showDeprecated) { |
|
1044 | + $filterDeprecated = "FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
1045 | 1045 | } |
1046 | 1046 | // extra conditions for parent and group, if specified |
1047 | - $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <" . $params->getParentLimit() . "> ." : ""; |
|
1048 | - $groupcond = ($params->getGroupLimit()) ? "<" . $params->getGroupLimit() . "> skos:member ?s ." : ""; |
|
1049 | - $pgcond = $parentcond . $groupcond; |
|
1047 | + $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <".$params->getParentLimit()."> ." : ""; |
|
1048 | + $groupcond = ($params->getGroupLimit()) ? "<".$params->getGroupLimit()."> skos:member ?s ." : ""; |
|
1049 | + $pgcond = $parentcond.$groupcond; |
|
1050 | 1050 | |
1051 | 1051 | $orderextra = $this->isDefaultEndpoint() ? $this->graph : ''; |
1052 | 1052 | |
@@ -1135,9 +1135,9 @@ discard block |
||
1135 | 1135 | $hit['type'][] = $this->shortenUri($typeuri); |
1136 | 1136 | } |
1137 | 1137 | |
1138 | - if(!empty($fields)) { |
|
1138 | + if (!empty($fields)) { |
|
1139 | 1139 | foreach ($fields as $prop) { |
1140 | - $propname = $prop . 's'; |
|
1140 | + $propname = $prop.'s'; |
|
1141 | 1141 | if (isset($row->$propname)) { |
1142 | 1142 | foreach (explode("\n", $row->$propname->getValue()) as $line) { |
1143 | 1143 | $rdata = str_getcsv($line, ',', '"', '"'); |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | $propvals = $rdata[2]; |
1153 | 1153 | } |
1154 | 1154 | |
1155 | - $hit['skos:' . $prop][] = $propvals; |
|
1155 | + $hit['skos:'.$prop][] = $propvals; |
|
1156 | 1156 | } |
1157 | 1157 | } |
1158 | 1158 | } |
@@ -1232,7 +1232,7 @@ discard block |
||
1232 | 1232 | * @return array query result object |
1233 | 1233 | */ |
1234 | 1234 | public function queryConcepts($vocabs, $fields, $unique, $params, $showDeprecated = false) { |
1235 | - $query = $this->generateConceptSearchQuery($fields, $unique, $params,$showDeprecated); |
|
1235 | + $query = $this->generateConceptSearchQuery($fields, $unique, $params, $showDeprecated); |
|
1236 | 1236 | $results = $this->query($query); |
1237 | 1237 | return $this->transformConceptSearchResults($results, $vocabs, $fields); |
1238 | 1238 | } |
@@ -1287,10 +1287,10 @@ discard block |
||
1287 | 1287 | $conditions = $this->formatFilterConditions($letter, $lang); |
1288 | 1288 | $filtercondLabel = $conditions['filterpref']; |
1289 | 1289 | $filtercondALabel = $conditions['filteralt']; |
1290 | - $qualifierClause = $qualifier ? "OPTIONAL { ?s <" . $qualifier->getURI() . "> ?qualifier }" : ""; |
|
1291 | - $filterDeprecated=""; |
|
1292 | - if(!$showDeprecated){ |
|
1293 | - $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
1290 | + $qualifierClause = $qualifier ? "OPTIONAL { ?s <".$qualifier->getURI()."> ?qualifier }" : ""; |
|
1291 | + $filterDeprecated = ""; |
|
1292 | + if (!$showDeprecated) { |
|
1293 | + $filterDeprecated = "FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
1294 | 1294 | } |
1295 | 1295 | $query = <<<EOQ |
1296 | 1296 | SELECT DISTINCT ?s ?label ?alabel ?qualifier |
@@ -1767,7 +1767,7 @@ discard block |
||
1767 | 1767 | if (!isset($row->label) || $row->label->getLang() === $lang) { |
1768 | 1768 | $ret[$row->object->getUri()] = $val; |
1769 | 1769 | } elseif ($row->label->getLang() === $fallbacklang) { |
1770 | - $val['label'] .= ' (' . $row->label->getLang() . ')'; |
|
1770 | + $val['label'] .= ' ('.$row->label->getLang().')'; |
|
1771 | 1771 | $ret[$row->object->getUri()] = $val; |
1772 | 1772 | } |
1773 | 1773 | } |
@@ -1863,10 +1863,10 @@ discard block |
||
1863 | 1863 | |
1864 | 1864 | $label = null; |
1865 | 1865 | if (isset($row->label)) { |
1866 | - if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang . "-") == 0) { |
|
1866 | + if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang."-") == 0) { |
|
1867 | 1867 | $label = $row->label->getValue(); |
1868 | 1868 | } else { |
1869 | - $label = $row->label->getValue() . " (" . $row->label->getLang() . ")"; |
|
1869 | + $label = $row->label->getValue()." (".$row->label->getLang().")"; |
|
1870 | 1870 | } |
1871 | 1871 | |
1872 | 1872 | } |
@@ -1942,8 +1942,8 @@ discard block |
||
1942 | 1942 | foreach ($result as $row) { |
1943 | 1943 | if (isset($row->top) && isset($row->label)) { |
1944 | 1944 | $label = $row->label->getValue(); |
1945 | - if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) { |
|
1946 | - $label .= ' (' . $row->label->getLang() . ')'; |
|
1945 | + if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang."-") !== 0) { |
|
1946 | + $label .= ' ('.$row->label->getLang().')'; |
|
1947 | 1947 | } |
1948 | 1948 | $top = array('uri' => $row->top->getUri(), 'topConceptOf' => $row->topuri->getUri(), 'label' => $label, 'hasChildren' => filter_var($row->children->getValue(), FILTER_VALIDATE_BOOLEAN)); |
1949 | 1949 | if (isset($row->notation)) { |
@@ -2036,7 +2036,7 @@ discard block |
||
2036 | 2036 | $ret[$uri]['exact'] = $row->exact->getUri(); |
2037 | 2037 | } |
2038 | 2038 | if (isset($row->tops)) { |
2039 | - $topConceptsList=explode(" ", $row->tops->getValue()); |
|
2039 | + $topConceptsList = explode(" ", $row->tops->getValue()); |
|
2040 | 2040 | // sort to guarantee an alphabetical ordering of the URI |
2041 | 2041 | sort($topConceptsList); |
2042 | 2042 | $ret[$uri]['tops'] = $topConceptsList; |
@@ -2049,8 +2049,8 @@ discard block |
||
2049 | 2049 | $label = null; |
2050 | 2050 | if (isset($row->childlabel)) { |
2051 | 2051 | $label = $row->childlabel->getValue(); |
2052 | - if ($row->childlabel->getLang() !== $lang && strpos($row->childlabel->getLang(), $lang . "-") !== 0) { |
|
2053 | - $label .= " (" . $row->childlabel->getLang() . ")"; |
|
2052 | + if ($row->childlabel->getLang() !== $lang && strpos($row->childlabel->getLang(), $lang."-") !== 0) { |
|
2053 | + $label .= " (".$row->childlabel->getLang().")"; |
|
2054 | 2054 | } |
2055 | 2055 | |
2056 | 2056 | } |
@@ -2071,8 +2071,8 @@ discard block |
||
2071 | 2071 | } |
2072 | 2072 | if (isset($row->label)) { |
2073 | 2073 | $preflabel = $row->label->getValue(); |
2074 | - if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) { |
|
2075 | - $preflabel .= ' (' . $row->label->getLang() . ')'; |
|
2074 | + if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang."-") !== 0) { |
|
2075 | + $preflabel .= ' ('.$row->label->getLang().')'; |
|
2076 | 2076 | } |
2077 | 2077 | |
2078 | 2078 | $ret[$uri]['prefLabel'] = $preflabel; |
@@ -2193,9 +2193,9 @@ discard block |
||
2193 | 2193 | */ |
2194 | 2194 | private function generateConceptGroupContentsQuery($groupClass, $group, $lang, $showDeprecated = false) { |
2195 | 2195 | $fcl = $this->generateFromClause(); |
2196 | - $filterDeprecated=""; |
|
2197 | - if(!$showDeprecated){ |
|
2198 | - $filterDeprecated=" FILTER NOT EXISTS { ?conc owl:deprecated true }"; |
|
2196 | + $filterDeprecated = ""; |
|
2197 | + if (!$showDeprecated) { |
|
2198 | + $filterDeprecated = " FILTER NOT EXISTS { ?conc owl:deprecated true }"; |
|
2199 | 2199 | } |
2200 | 2200 | $query = <<<EOQ |
2201 | 2201 | SELECT ?conc ?super ?label ?members ?type ?notation $fcl |
@@ -2234,10 +2234,10 @@ discard block |
||
2234 | 2234 | 'type' => array($row->type->shorten()), |
2235 | 2235 | ); |
2236 | 2236 | if (isset($row->label)) { |
2237 | - if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang . "-") == 0) { |
|
2237 | + if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang."-") == 0) { |
|
2238 | 2238 | $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue(); |
2239 | 2239 | } else { |
2240 | - $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue() . " (" . $row->label->getLang() . ")"; |
|
2240 | + $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue()." (".$row->label->getLang().")"; |
|
2241 | 2241 | } |
2242 | 2242 | |
2243 | 2243 | } |
@@ -2265,8 +2265,8 @@ discard block |
||
2265 | 2265 | * @param boolean $showDeprecated whether to include deprecated concepts in search results |
2266 | 2266 | * @return array Result array with concept URI as key and concept label as value |
2267 | 2267 | */ |
2268 | - public function listConceptGroupContents($groupClass, $group, $lang,$showDeprecated = false) { |
|
2269 | - $query = $this->generateConceptGroupContentsQuery($groupClass, $group, $lang,$showDeprecated); |
|
2268 | + public function listConceptGroupContents($groupClass, $group, $lang, $showDeprecated = false) { |
|
2269 | + $query = $this->generateConceptGroupContentsQuery($groupClass, $group, $lang, $showDeprecated); |
|
2270 | 2270 | $result = $this->query($query); |
2271 | 2271 | return $this->transformConceptGroupContentsResults($result, $lang); |
2272 | 2272 | } |
@@ -2280,9 +2280,9 @@ discard block |
||
2280 | 2280 | * @param boolean $showDeprecated whether to include deprecated concepts in the change list |
2281 | 2281 | * @return string sparql query |
2282 | 2282 | */ |
2283 | - private function generateChangeListQuery($prop, $lang, $offset, $limit=200, $showDeprecated=false) { |
|
2283 | + private function generateChangeListQuery($prop, $lang, $offset, $limit = 200, $showDeprecated = false) { |
|
2284 | 2284 | $fcl = $this->generateFromClause(); |
2285 | - $offset = ($offset) ? 'OFFSET ' . $offset : ''; |
|
2285 | + $offset = ($offset) ? 'OFFSET '.$offset : ''; |
|
2286 | 2286 | |
2287 | 2287 | //Additional clauses when deprecated concepts need to be included in the results |
2288 | 2288 | $deprecatedOptions = ''; |
@@ -2372,7 +2372,7 @@ discard block |
||
2372 | 2372 | * @param boolean $showDeprecated whether to include deprecated concepts in the change list |
2373 | 2373 | * @return array Result array |
2374 | 2374 | */ |
2375 | - public function queryChangeList($prop, $lang, $offset, $limit, $showDeprecated=false) { |
|
2375 | + public function queryChangeList($prop, $lang, $offset, $limit, $showDeprecated = false) { |
|
2376 | 2376 | $query = $this->generateChangeListQuery($prop, $lang, $offset, $limit, $showDeprecated); |
2377 | 2377 | |
2378 | 2378 | $result = $this->query($query); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | // wrap with JSONP callback if requested |
26 | 26 | if (filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS)) { |
27 | 27 | header("Content-type: application/javascript; charset=utf-8"); |
28 | - echo filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS) . "(" . json_encode($data) . ");"; |
|
28 | + echo filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS)."(".json_encode($data).");"; |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | 'vocabularies' => 'onki:hasVocabulary', |
89 | 89 | 'id' => 'onki:vocabularyIdentifier', |
90 | 90 | 'uri' => '@id', |
91 | - '@base' => $this->getBaseHref() . "rest/v1/vocabularies", |
|
91 | + '@base' => $this->getBaseHref()."rest/v1/vocabularies", |
|
92 | 92 | ), |
93 | 93 | 'uri' => '', |
94 | 94 | 'vocabularies' => $results, |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | // convert to vocids array to support multi-vocabulary search |
106 | 106 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : array(); |
107 | 107 | $vocabObjects = array(); |
108 | - foreach($vocids as $vocid) { |
|
108 | + foreach ($vocids as $vocid) { |
|
109 | 109 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
110 | 110 | } |
111 | 111 | $parameters->setVocabularies($vocabObjects); |
@@ -136,12 +136,12 @@ discard block |
||
136 | 136 | foreach ($parameters->getAdditionalFields() as $field) { |
137 | 137 | |
138 | 138 | // Quick-and-dirty compactification |
139 | - $context[$field] = 'skos:' . $field; |
|
139 | + $context[$field] = 'skos:'.$field; |
|
140 | 140 | foreach ($results as &$result) { |
141 | 141 | foreach ($result as $k => $v) { |
142 | - if ($k == 'skos:' . $field) { |
|
142 | + if ($k == 'skos:'.$field) { |
|
143 | 143 | $result[$field] = $v; |
144 | - unset($result['skos:' . $field]); |
|
144 | + unset($result['skos:'.$field]); |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 | } |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | 'prefLabel' => 'skos:prefLabel', |
233 | 233 | 'title' => 'dct:title', |
234 | 234 | '@language' => $request->getLang(), |
235 | - '@base' => $this->getBaseHref() . "rest/v1/" . $vocab->getId() . "/", |
|
235 | + '@base' => $this->getBaseHref()."rest/v1/".$vocab->getId()."/", |
|
236 | 236 | ), |
237 | 237 | 'uri' => '', |
238 | 238 | 'id' => $vocab->getId(), |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | 'subTypes' => array('@id' => 'void:class', '@type' => '@id'), |
288 | 288 | 'count' => 'void:entities', |
289 | 289 | '@language' => $request->getLang(), |
290 | - '@base' => $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/", |
|
290 | + '@base' => $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/", |
|
291 | 291 | ), |
292 | 292 | 'uri' => '', |
293 | 293 | 'id' => $request->getVocab()->getId(), |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | 'language' => 'void-ext:language', |
370 | 370 | 'properties' => 'void:propertyPartition', |
371 | 371 | 'labels' => 'void:triples', |
372 | - '@base' => $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/", |
|
372 | + '@base' => $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/", |
|
373 | 373 | ), |
374 | 374 | 'uri' => '', |
375 | 375 | 'id' => $request->getVocab()->getId(), |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $types[] = $type; |
411 | 411 | } |
412 | 412 | |
413 | - $base = $request->getVocab() ? $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/" : $this->getBaseHref() . "rest/v1/"; |
|
413 | + $base = $request->getVocab() ? $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/" : $this->getBaseHref()."rest/v1/"; |
|
414 | 414 | |
415 | 415 | $ret = array_merge_recursive($this->context, array( |
416 | 416 | '@context' => array( |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | if ($lang === null) { |
452 | 452 | // case 1A: exact match on preferred label in any language |
453 | 453 | foreach ($results as $res) { |
454 | - if (isset($res['matchedPrefLabel']) && $res['matchedPrefLabel'] == $label) { |
|
454 | + if (isset($res['matchedPrefLabel']) && $res['matchedPrefLabel'] == $label) { |
|
455 | 455 | $res['prefLabel'] = $res['matchedPrefLabel']; |
456 | 456 | unset($res['matchedPrefLabel']); |
457 | 457 | $hits[] = $res; |
@@ -573,19 +573,19 @@ discard block |
||
573 | 573 | |
574 | 574 | $format = $this->negotiateFormat(array_keys($urls), $request->getServerConstant('HTTP_ACCEPT'), $request->getQueryParam('format')); |
575 | 575 | if (!$format) { |
576 | - return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . implode(' ', array_keys($urls))); |
|
576 | + return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: ".implode(' ', array_keys($urls))); |
|
577 | 577 | } |
578 | 578 | if (is_array($urls[$format])) { |
579 | 579 | $arr = $urls[$format]; |
580 | 580 | $dataLang = $request->getLang(); |
581 | 581 | if (isset($arr[$dataLang])) { |
582 | - header("Location: " . $arr[$dataLang]); |
|
582 | + header("Location: ".$arr[$dataLang]); |
|
583 | 583 | } else { |
584 | 584 | $vocid = $request->getVocab()->getId(); |
585 | 585 | return $this->returnError('404', 'Not Found', "No download source URL known for vocabulary $vocid in language $dataLang"); |
586 | 586 | } |
587 | 587 | } else { |
588 | - header("Location: " . $urls[$format]); |
|
588 | + header("Location: ".$urls[$format]); |
|
589 | 589 | } |
590 | 590 | } |
591 | 591 | |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | |
649 | 649 | $format = $this->negotiateFormat(explode(' ', self::SUPPORTED_FORMATS), $request->getServerConstant('HTTP_ACCEPT'), $request->getQueryParam('format')); |
650 | 650 | if (!$format) { |
651 | - return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . self::SUPPORTED_FORMATS); |
|
651 | + return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: ".self::SUPPORTED_FORMATS); |
|
652 | 652 | } |
653 | 653 | |
654 | 654 | $vocid = $vocab ? $vocab->getId() : null; |
@@ -933,7 +933,7 @@ discard block |
||
933 | 933 | } |
934 | 934 | } |
935 | 935 | // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs) |
936 | - if (! isset($results[$uri]['top'])) { |
|
936 | + if (!isset($results[$uri]['top'])) { |
|
937 | 937 | $results[$uri]['top'] = $results[$uri]['tops'][0]; |
938 | 938 | } |
939 | 939 | } else { |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | $changeList = $request->getVocab()->getChangeList($prop, $request->getLang(), $offset, $limit); |
1112 | 1112 | |
1113 | 1113 | $simpleChangeList = array(); |
1114 | - foreach($changeList as $conceptInfo) { |
|
1114 | + foreach ($changeList as $conceptInfo) { |
|
1115 | 1115 | if (array_key_exists('date', $conceptInfo)) { |
1116 | 1116 | $concept = array( |
1117 | 1117 | 'uri' => $conceptInfo['uri'], |
@@ -1127,10 +1127,10 @@ discard block |
||
1127 | 1127 | } |
1128 | 1128 | } |
1129 | 1129 | return $this->returnJson(array_merge_recursive($this->context, |
1130 | - array('@context' => array( '@language' => $request->getLang(), |
|
1130 | + array('@context' => array('@language' => $request->getLang(), |
|
1131 | 1131 | 'prefLabel' => 'skos:prefLabel', |
1132 | 1132 | 'xsd' => 'http://www.w3.org/2001/XMLSchema#', |
1133 | - 'date' => array( '@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#dateTime') ) |
|
1133 | + 'date' => array('@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#dateTime')) |
|
1134 | 1134 | ), |
1135 | 1135 | array('changeList' => $simpleChangeList))); |
1136 | 1136 |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @param int $maxlength maximum length of parameter, or null if unlimited |
124 | 124 | * @return string parameter content, or null if no parameter found |
125 | 125 | */ |
126 | - public function getQueryParamPOST($paramName, $maxlength=null) |
|
126 | + public function getQueryParamPOST($paramName, $maxlength = null) |
|
127 | 127 | { |
128 | 128 | if (!isset($this->queryParamsPOST[$paramName])) return null; |
129 | 129 | $val = filter_var($this->queryParamsPOST[$paramName], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | |
215 | 215 | public function getRequestUri() |
216 | 216 | { |
217 | - return $this->getServerConstant('HTTP_HOST') . $this->getServerConstant('REQUEST_URI'); |
|
217 | + return $this->getServerConstant('HTTP_HOST').$this->getServerConstant('REQUEST_URI'); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | /** |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | * @param string $newlang new UI language to set |
223 | 223 | * @return string the relative url of the page |
224 | 224 | */ |
225 | - public function getLangUrl($newlang=null) |
|
225 | + public function getLangUrl($newlang = null) |
|
226 | 226 | { |
227 | 227 | $script_name = str_replace('/index.php', '', $this->getServerConstant('SCRIPT_NAME')); |
228 | 228 | $langurl = substr(str_replace($script_name, '', strval($this->getServerConstant('REQUEST_URI'))), 1); |