@@ -33,7 +33,8 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | - * @return Docman_Version |
|
36 | + * @param integer $version_number |
|
37 | + * @return null|Docman_LinkVersion |
|
37 | 38 | */ |
38 | 39 | private function getLinkVersion(Docman_Link $item, $version_number) { |
39 | 40 | return $this->link_version_factory->getSpecificVersion($item, $version_number); |
@@ -55,6 +55,10 @@ discard block |
||
55 | 55 | return false; |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param integer $group_id |
|
60 | + * @param string $wiki_page_name |
|
61 | + */ |
|
58 | 62 | protected function getWikiPage($group_id, $wiki_page_name) { |
59 | 63 | return new WikiPage($group_id, $wiki_page_name); |
60 | 64 | } |
@@ -65,6 +69,7 @@ discard block |
||
65 | 69 | * @see process() |
66 | 70 | * |
67 | 71 | * @param WikiPage $wiki_page The wiki page |
72 | + * @param integer $group_id |
|
68 | 73 | * |
69 | 74 | * @return bool true if success (means status=done), false otherwise |
70 | 75 | */ |
@@ -82,6 +87,11 @@ discard block |
||
82 | 87 | return $txt; |
83 | 88 | } |
84 | 89 | |
90 | + /** |
|
91 | + * @param integer $group_id |
|
92 | + * @param string $wiki_page_name |
|
93 | + * @param boolean $with_link |
|
94 | + */ |
|
85 | 95 | private function verbalizeWikiPageId($group_id, $wiki_page_name, $with_link) { |
86 | 96 | if ($with_link) { |
87 | 97 | $txt = '<a href="/wiki/index.php?group_id='. $group_id .'&pagename='. $wiki_page_name.'">'. $wiki_page_name .'</a>'; |
@@ -45,26 +45,41 @@ |
||
45 | 45 | return $docman_file; |
46 | 46 | } |
47 | 47 | |
48 | + /** |
|
49 | + * @param integer $item_id |
|
50 | + */ |
|
48 | 51 | public function withId($item_id) { |
49 | 52 | $this->item_id = $item_id; |
50 | 53 | return $this; |
51 | 54 | } |
52 | 55 | |
56 | + /** |
|
57 | + * @param integer $group_id |
|
58 | + */ |
|
53 | 59 | public function withGroupId($group_id) { |
54 | 60 | $this->group_id = $group_id; |
55 | 61 | return $this; |
56 | 62 | } |
57 | 63 | |
64 | + /** |
|
65 | + * @param integer $owner_id |
|
66 | + */ |
|
58 | 67 | public function withOwnerId($owner_id) { |
59 | 68 | $this->owner_id = $owner_id; |
60 | 69 | return $this; |
61 | 70 | } |
62 | 71 | |
72 | + /** |
|
73 | + * @param string $title |
|
74 | + */ |
|
63 | 75 | public function withTitle($title) { |
64 | 76 | $this->title = $title; |
65 | 77 | return $this; |
66 | 78 | } |
67 | 79 | |
80 | + /** |
|
81 | + * @param string $description |
|
82 | + */ |
|
68 | 83 | public function withDescription($description) { |
69 | 84 | $this->description = $description; |
70 | 85 | return $this; |
@@ -32,6 +32,9 @@ |
||
32 | 32 | $this->actions = mock('FullTextSearchWikiActions'); |
33 | 33 | } |
34 | 34 | |
35 | + /** |
|
36 | + * @param string $parameters |
|
37 | + */ |
|
35 | 38 | public function aSystemEventWithParameter($parameters) { |
36 | 39 | $id = $type = $owner = $priority = $status = $create_date = $process_date = $end_date = $log = null; |
37 | 40 | $event = partial_mock( |
@@ -17,6 +17,9 @@ discard block |
||
17 | 17 | |
18 | 18 | /* */ |
19 | 19 | |
20 | + /** |
|
21 | + * @param string $val |
|
22 | + */ |
|
20 | 23 | function setStatic($val) { |
21 | 24 | static $arc_static = ''; |
22 | 25 | if ($val) $arc_static = $val; /* set */ |
@@ -353,6 +356,9 @@ discard block |
||
353 | 356 | |
354 | 357 | /* */ |
355 | 358 | |
359 | + /** |
|
360 | + * @param string $name |
|
361 | + */ |
|
356 | 362 | function getComponent($name, $a = '', $caller = '') { |
357 | 363 | ARC2::inc($name); |
358 | 364 | $prefix = 'ARC2'; |
@@ -379,6 +385,9 @@ discard block |
||
379 | 385 | |
380 | 386 | /* parsers */ |
381 | 387 | |
388 | + /** |
|
389 | + * @param string $prefix |
|
390 | + */ |
|
382 | 391 | function getParser($prefix, $a = '') { |
383 | 392 | return ARC2::getComponent($prefix . 'Parser', $a); |
384 | 393 | } |
@@ -451,6 +460,9 @@ discard block |
||
451 | 460 | |
452 | 461 | /* serializers */ |
453 | 462 | |
463 | + /** |
|
464 | + * @param string $prefix |
|
465 | + */ |
|
454 | 466 | function getSer($prefix, $a = '') { |
455 | 467 | return ARC2::getComponent($prefix . 'Serializer', $a); |
456 | 468 | } |
@@ -53,6 +53,9 @@ discard block |
||
53 | 53 | return isset($o->$name) ? $o->$name : $default; |
54 | 54 | } |
55 | 55 | |
56 | + /** |
|
57 | + * @param string $name |
|
58 | + */ |
|
56 | 59 | function v1($name, $default = false, $o = false) {/* value if 1 (= not empty) */ |
57 | 60 | if ($o === false) $o =& $this; |
58 | 61 | if (is_array($o)) { |
@@ -61,6 +64,9 @@ discard block |
||
61 | 64 | return (isset($o->$name) && $o->$name) ? $o->$name : $default; |
62 | 65 | } |
63 | 66 | |
67 | + /** |
|
68 | + * @param string $name |
|
69 | + */ |
|
64 | 70 | function m($name, $a = false, $default = false, $o = false) {/* call method */ |
65 | 71 | if ($o === false) $o =& $this; |
66 | 72 | return method_exists($o, $name) ? $o->$name($a) : $default; |
@@ -83,6 +89,11 @@ discard block |
||
83 | 89 | return $r; |
84 | 90 | } |
85 | 91 | |
92 | + /** |
|
93 | + * @param string $v |
|
94 | + * |
|
95 | + * @return string |
|
96 | + */ |
|
86 | 97 | function deCamelCase($v, $uc_first = 0) { |
87 | 98 | $r = str_replace('_', ' ', $v); |
88 | 99 | $r = preg_replace('/([a-z0-9])([A-Z])/e', '"\\1 " . strtolower("\\2")', $r); |
@@ -103,6 +114,9 @@ discard block |
||
103 | 114 | |
104 | 115 | /* */ |
105 | 116 | |
117 | + /** |
|
118 | + * @param string $v |
|
119 | + */ |
|
106 | 120 | function addError($v) { |
107 | 121 | if (!in_array($v, $this->errors)) { |
108 | 122 | $this->errors[] = $v; |
@@ -140,6 +154,9 @@ discard block |
||
140 | 154 | |
141 | 155 | /* */ |
142 | 156 | |
157 | + /** |
|
158 | + * @return string |
|
159 | + */ |
|
143 | 160 | function getPName($v, $connector = ':') { |
144 | 161 | /* is already a pname */ |
145 | 162 | if ($ns = $this->getPNameNamespace($v, $connector)) { |
@@ -174,6 +191,9 @@ discard block |
||
174 | 191 | return $this->ns[$m[1]]; |
175 | 192 | } |
176 | 193 | |
194 | + /** |
|
195 | + * @param string $ns |
|
196 | + */ |
|
177 | 197 | function getPrefix($ns) { |
178 | 198 | if (!isset($this->nsp[$ns])) { |
179 | 199 | $this->ns['ns' . $this->ns_count] = $ns; |
@@ -40,22 +40,37 @@ discard block |
||
40 | 40 | |
41 | 41 | /* */ |
42 | 42 | |
43 | + /** |
|
44 | + * @param string $v |
|
45 | + */ |
|
43 | 46 | function setHTTPMethod($v) { |
44 | 47 | $this->http_method = $v; |
45 | 48 | } |
46 | 49 | |
50 | + /** |
|
51 | + * @param string $v |
|
52 | + */ |
|
47 | 53 | function setMessageBody($v) { |
48 | 54 | $this->message_body = $v; |
49 | 55 | } |
50 | 56 | |
57 | + /** |
|
58 | + * @param string $v |
|
59 | + */ |
|
51 | 60 | function setAcceptHeader($v) { |
52 | 61 | $this->http_accept_header = $v; |
53 | 62 | } |
54 | 63 | |
64 | + /** |
|
65 | + * @param string $v |
|
66 | + */ |
|
55 | 67 | function setCustomHeaders($v) { |
56 | 68 | $this->http_custom_headers = $v; |
57 | 69 | } |
58 | 70 | |
71 | + /** |
|
72 | + * @param string $v |
|
73 | + */ |
|
59 | 74 | function addCustomHeaders($v) { |
60 | 75 | if ($this->http_custom_headers) $this->http_custom_headers .= "\r\n"; |
61 | 76 | $this->http_custom_headers .= $v; |
@@ -189,6 +204,9 @@ discard block |
||
189 | 204 | $this->stream = ($data) ? $this->getDataStream($data) : $this->getSocketStream($this->base); |
190 | 205 | } |
191 | 206 | |
207 | + /** |
|
208 | + * @param string $data |
|
209 | + */ |
|
192 | 210 | function getDataStream($data) { |
193 | 211 | return array('type' => 'data', 'pos' => 0, 'headers' => array(), 'size' => strlen($data), 'data' => $data, 'buffer' => ''); |
194 | 212 | } |
@@ -399,6 +417,9 @@ discard block |
||
399 | 417 | |
400 | 418 | /* */ |
401 | 419 | |
420 | + /** |
|
421 | + * @return boolean |
|
422 | + */ |
|
402 | 423 | function getResponseHeaders() { |
403 | 424 | if (isset($this->stream) && isset($this->stream['headers'])) { |
404 | 425 | return $this->stream['headers']; |
@@ -44,6 +44,9 @@ |
||
44 | 44 | $this->index[$s] = $props; |
45 | 45 | } |
46 | 46 | |
47 | + /** |
|
48 | + * @param string $p |
|
49 | + */ |
|
47 | 50 | function setProp($p, $os, $s = '') { |
48 | 51 | if (!$s) $s = $this->uri; |
49 | 52 | /* single plain value */ |
@@ -81,6 +81,10 @@ discard block |
||
81 | 81 | |
82 | 82 | /* */ |
83 | 83 | |
84 | + /** |
|
85 | + * @param integer $level |
|
86 | + * @param integer $pos |
|
87 | + */ |
|
84 | 88 | function processNode($n, $ct, $level, $pos) { |
85 | 89 | $n = $this->preProcessNode($n); |
86 | 90 | /* local context */ |
@@ -164,6 +168,9 @@ discard block |
||
164 | 168 | return $r; |
165 | 169 | } |
166 | 170 | |
171 | + /** |
|
172 | + * @param string $o_type |
|
173 | + */ |
|
167 | 174 | function addTriples($n, $ct, $o_type) { |
168 | 175 | foreach (array('href uri', 'src uri', 'title', 'value') as $k) { |
169 | 176 | if (isset($n['a'][$k])) { |