@@ -39,6 +39,9 @@ discard block |
||
39 | 39 | |
40 | 40 | /* */ |
41 | 41 | |
42 | + /** |
|
43 | + * @param string $re |
|
44 | + */ |
|
42 | 45 | function x($re, $v, $options = 'si', $keep_ws = 0) { |
43 | 46 | list($ws, $v) = preg_match('/^(\s*)(.*)$/s', $v, $m) ? array($m[1], $m[2]) : array('', $v); |
44 | 47 | if (preg_match("/^" . $re . "(.*)$/" . $options, $v, $m)) { |
@@ -141,6 +144,9 @@ discard block |
||
141 | 144 | |
142 | 145 | /* */ |
143 | 146 | |
147 | + /** |
|
148 | + * @param string $v |
|
149 | + */ |
|
144 | 150 | function processData($v) { |
145 | 151 | $sub_v = $v; |
146 | 152 | do { |
@@ -243,6 +249,9 @@ discard block |
||
243 | 249 | |
244 | 250 | /* */ |
245 | 251 | |
252 | + /** |
|
253 | + * @param string $v |
|
254 | + */ |
|
246 | 255 | function xAttributes($v) { |
247 | 256 | $r = array(); |
248 | 257 | while ((list($sub_r, $v) = $this->xAttribute($v)) && $sub_r) { |
@@ -290,6 +299,10 @@ discard block |
||
290 | 299 | |
291 | 300 | /* */ |
292 | 301 | |
302 | + /** |
|
303 | + * @param string $t |
|
304 | + * @param string $v |
|
305 | + */ |
|
293 | 306 | function isEmpty($t, $v) { |
294 | 307 | if (preg_match('/^(area|base|br|col|frame|hr|input|img|link|xmeta|param)$/', $t)) { |
295 | 308 | return 1; |
@@ -40,6 +40,9 @@ |
||
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | + /** |
|
44 | + * @return string |
|
45 | + */ |
|
43 | 46 | function getContext() { |
44 | 47 | if (!isset($this->struct['canonical_mapping'])) return ''; |
45 | 48 | foreach ($this->struct['canonical_mapping'] as $k => $v) return $v; |
@@ -416,6 +416,9 @@ |
||
416 | 416 | return array(0, $v); |
417 | 417 | } |
418 | 418 | |
419 | + /** |
|
420 | + * @param string $pattern_id |
|
421 | + */ |
|
419 | 422 | function indexBnodes($triples, $pattern_id) { |
420 | 423 | $index_id = count($this->bnode_pattern_index['patterns']); |
421 | 424 | $index_id = $pattern_id; |
@@ -96,6 +96,9 @@ |
||
96 | 96 | |
97 | 97 | /* */ |
98 | 98 | |
99 | + /** |
|
100 | + * @return string |
|
101 | + */ |
|
99 | 102 | function getEncoding($src = 'config') { |
100 | 103 | if ($src == 'parser') { |
101 | 104 | return $this->target_encoding; |
@@ -34,6 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | /* */ |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $re |
|
39 | + */ |
|
37 | 40 | function x($re, $v, $options = 'si') { |
38 | 41 | $v = preg_replace('/^[\xA0\xC2]+/', ' ', $v); |
39 | 42 | while (preg_match('/^\s*(\#[^\xd\xa]*)(.*)$/si', $v, $m)) {/* comment removal */ |
@@ -682,6 +685,9 @@ discard block |
||
682 | 685 | |
683 | 686 | /* 77.. */ |
684 | 687 | |
688 | + /** |
|
689 | + * @param string $v |
|
690 | + */ |
|
685 | 691 | function xINTEGER($v) { |
686 | 692 | if ($r = $this->x('([0-9]+)', $v)) { |
687 | 693 | return array($r[1], $r[2]); |
@@ -748,6 +754,9 @@ discard block |
||
748 | 754 | |
749 | 755 | /* 97.. */ |
750 | 756 | |
757 | + /** |
|
758 | + * @param string $v |
|
759 | + */ |
|
751 | 760 | function xVARNAME($v) { |
752 | 761 | $r = ''; |
753 | 762 | do { |
@@ -29,6 +29,9 @@ |
||
29 | 29 | |
30 | 30 | /* */ |
31 | 31 | |
32 | + /** |
|
33 | + * @return string |
|
34 | + */ |
|
32 | 35 | function getLabel($res, $ps = '') { |
33 | 36 | if (!$ps) $ps = array(); |
34 | 37 | foreach ($ps as $p => $os) { |
@@ -125,6 +125,9 @@ |
||
125 | 125 | return $r; |
126 | 126 | } |
127 | 127 | |
128 | + /** |
|
129 | + * @param integer $no |
|
130 | + */ |
|
128 | 131 | function getEscapedChar($c, $no) {/*see http://www.w3.org/TR/rdf-testcases/#ntrip_strings */ |
129 | 132 | if ($no < 9) return "\\u" . sprintf('%04X', $no); /* #x0-#x8 (0-8) */ |
130 | 133 | if ($no == 9) return '\t'; /* #x9 (9) */ |
@@ -27,6 +27,9 @@ |
||
27 | 27 | |
28 | 28 | /* */ |
29 | 29 | |
30 | + /** |
|
31 | + * @return string |
|
32 | + */ |
|
30 | 33 | function getLabel($res, $ps = '') { |
31 | 34 | if (!$ps) $ps = array(); |
32 | 35 | foreach ($ps as $p => $os) { |
@@ -32,6 +32,11 @@ |
||
32 | 32 | |
33 | 33 | /* */ |
34 | 34 | |
35 | + /** |
|
36 | + * @param string $type |
|
37 | + * |
|
38 | + * @return string |
|
39 | + */ |
|
35 | 40 | function getTerm($v, $type) { |
36 | 41 | if (!is_array($v)) {/* uri or bnode */ |
37 | 42 | if (preg_match('/^\_\:(.*)$/', $v, $m)) { |