@@ -40,6 +40,9 @@ |
||
40 | 40 | $this->reader =& $reader; |
41 | 41 | } |
42 | 42 | |
43 | + /** |
|
44 | + * @param string $path |
|
45 | + */ |
|
43 | 46 | function parse($path, $data = '') { |
44 | 47 | /* reader */ |
45 | 48 | if (!isset($this->reader)) { |
@@ -140,6 +140,9 @@ |
||
140 | 140 | if (isset($res[$this->dc . 'identifier'])) return array($res[$this->dc . 'identifier'][0]['value'] => $res); |
141 | 141 | } |
142 | 142 | |
143 | + /** |
|
144 | + * @param string $container |
|
145 | + */ |
|
143 | 146 | function extractProps($els, $container) { |
144 | 147 | $res = array(); |
145 | 148 | foreach ($els as $info) { |
@@ -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; |
@@ -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; |
@@ -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 { |
@@ -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)) { |
@@ -113,6 +113,9 @@ |
||
113 | 113 | return array(0, $v); |
114 | 114 | } |
115 | 115 | |
116 | + /** |
|
117 | + * @param string $v |
|
118 | + */ |
|
116 | 119 | function xBlockSet($v) { |
117 | 120 | if (!$r = $this->x("\{", $v)) return array(0, $v); |
118 | 121 | $blocks = array(); |