@@ -32,6 +32,9 @@ discard block |
||
32 | 32 | |
33 | 33 | /* */ |
34 | 34 | |
35 | + /** |
|
36 | + * @param string $re |
|
37 | + */ |
|
35 | 38 | function x($re, $v, $options = 'si') { |
36 | 39 | return ARC2::x($re, $v, $options); |
37 | 40 | } |
@@ -119,6 +122,9 @@ discard block |
||
119 | 122 | |
120 | 123 | /* */ |
121 | 124 | |
125 | + /** |
|
126 | + * @param string $a |
|
127 | + */ |
|
122 | 128 | function hasAttribute($a, $n, $v) { |
123 | 129 | $vs = is_array($v) ? $v : array($v); |
124 | 130 | $a_vs = $this->v($a . ' m', array(), $n['a']); |
@@ -153,6 +159,9 @@ discard block |
||
153 | 159 | |
154 | 160 | /* */ |
155 | 161 | |
162 | + /** |
|
163 | + * @return string |
|
164 | + */ |
|
156 | 165 | function getPlainContent($n, $trim = 1, $use_img_alt = 1) { |
157 | 166 | if ($n['tag'] == 'comment') { |
158 | 167 | $r = ''; |
@@ -91,6 +91,9 @@ |
||
91 | 91 | |
92 | 92 | /* */ |
93 | 93 | |
94 | + /** |
|
95 | + * @param string $s |
|
96 | + */ |
|
94 | 97 | function extractResourceRDF($struct, $s, $pos = 0) { |
95 | 98 | $s_type = preg_match('/^\_\:/', $s) ? 'bnode' : 'uri'; |
96 | 99 | $date_prefixes = array(); |
@@ -28,6 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | /* */ |
30 | 30 | |
31 | + /** |
|
32 | + * @param string $re |
|
33 | + */ |
|
31 | 34 | function x($re, $v, $options = 'si') { |
32 | 35 | while (preg_match('/^\s*(\/\*.*\*\/)(.*)$/Usi', $v, $m)) {/* comment removal */ |
33 | 36 | $v = $m[2]; |
@@ -61,6 +64,9 @@ discard block |
||
61 | 64 | |
62 | 65 | /* */ |
63 | 66 | |
67 | + /** |
|
68 | + * @param string $v |
|
69 | + */ |
|
64 | 70 | function extractObject($v) { |
65 | 71 | if (function_exists('json_decode')) return array(json_decode($v, 1), ''); |
66 | 72 | $r = array(); |
@@ -89,6 +89,9 @@ discard block |
||
89 | 89 | |
90 | 90 | /* */ |
91 | 91 | |
92 | + /** |
|
93 | + * @return string |
|
94 | + */ |
|
92 | 95 | function getEncoding($src = 'config') { |
93 | 96 | if ($src == 'parser') { |
94 | 97 | return $this->target_encoding; |
@@ -113,6 +116,9 @@ discard block |
||
113 | 116 | |
114 | 117 | /* */ |
115 | 118 | |
119 | + /** |
|
120 | + * @return boolean |
|
121 | + */ |
|
116 | 122 | function getNodeIndex(){ |
117 | 123 | if (!isset($this->node_index)) { |
118 | 124 | /* index by parent */ |
@@ -289,6 +295,9 @@ discard block |
||
289 | 295 | $this->level--; |
290 | 296 | } |
291 | 297 | |
298 | + /** |
|
299 | + * @param integer $p |
|
300 | + */ |
|
292 | 301 | function cData($p, $d) { |
293 | 302 | //echo trim($d) ? "<br />\n".'cdata: ' . $d : ''; flush(); |
294 | 303 | $node = $this->getCurNode(); |
@@ -304,6 +313,9 @@ discard block |
||
304 | 313 | } |
305 | 314 | } |
306 | 315 | |
316 | + /** |
|
317 | + * @param string $prf |
|
318 | + */ |
|
307 | 319 | function nsDecl($p, $prf, $uri) { |
308 | 320 | if (is_array($uri)) return 1; |
309 | 321 | $this->ns[$prf] = $uri; |
@@ -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 { |