@@ -102,7 +102,6 @@ discard block |
||
102 | 102 | |
103 | 103 | /** Checks if the given file is really writable. The standard PHP function |
104 | 104 | * is_writable() does not work properly on Windows servers. |
105 | - * @param string $dir |
|
106 | 105 | * @return bool */ |
107 | 106 | |
108 | 107 | static function isWritable($filename) { |
@@ -114,7 +113,6 @@ discard block |
||
114 | 113 | } |
115 | 114 | |
116 | 115 | /** Get the extension from filename |
117 | - * @param string $file |
|
118 | 116 | * @param bool $toLower |
119 | 117 | * @return string */ |
120 | 118 |
@@ -616,6 +616,9 @@ discard block |
||
616 | 616 | Output: |
617 | 617 | \*======================================================================*/ |
618 | 618 | |
619 | + /** |
|
620 | + * @param string $http_method |
|
621 | + */ |
|
619 | 622 | function _httprequest($url, $fp, $URI, $http_method, $content_type = "", $body = "") |
620 | 623 | { |
621 | 624 | $cookie_headers = ''; |
@@ -923,6 +926,10 @@ discard block |
||
923 | 926 | Output: post body |
924 | 927 | \*======================================================================*/ |
925 | 928 | |
929 | + /** |
|
930 | + * @param string $formvars |
|
931 | + * @param string $formfiles |
|
932 | + */ |
|
926 | 933 | function _prepare_post_body($formvars, $formfiles) |
927 | 934 | { |
928 | 935 | settype($formvars, "array"); |
@@ -243,6 +243,9 @@ discard block |
||
243 | 243 | } |
244 | 244 | } |
245 | 245 | |
246 | +/** |
|
247 | + * @param integer $lvl |
|
248 | + */ |
|
246 | 249 | function debug ($debugmsg, $lvl=E_USER_NOTICE) { |
247 | 250 | trigger_error("MagpieRSS [debug] $debugmsg", $lvl); |
248 | 251 | } |
@@ -289,6 +292,9 @@ discard block |
||
289 | 292 | Input: an HTTP response object (see Snoopy) |
290 | 293 | Output: parsed RSS object (see rss_parse) |
291 | 294 | \*=======================================================================*/ |
295 | +/** |
|
296 | + * @param Snoopy $resp |
|
297 | + */ |
|
292 | 298 | function _response_to_rss ($resp) { |
293 | 299 | $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING ); |
294 | 300 |
@@ -18,11 +18,17 @@ discard block |
||
18 | 18 | $this->request_time = $_SERVER['REQUEST_TIME'] + $modx->config['server_offset_time']; |
19 | 19 | } |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $path |
|
23 | + */ |
|
21 | 24 | function setCachepath($path) |
22 | 25 | { |
23 | 26 | $this->cachePath = $path; |
24 | 27 | } |
25 | 28 | |
29 | + /** |
|
30 | + * @param boolean $bool |
|
31 | + */ |
|
26 | 32 | function setReport($bool) |
27 | 33 | { |
28 | 34 | $this->showReport = $bool; |
@@ -45,6 +51,9 @@ discard block |
||
45 | 51 | return str_replace($q1, $q2, $s); |
46 | 52 | } |
47 | 53 | |
54 | + /** |
|
55 | + * @return string |
|
56 | + */ |
|
48 | 57 | function getParents($id, $path = '') |
49 | 58 | { // modx:returns child's parent |
50 | 59 | global $modx; |
@@ -148,6 +157,9 @@ discard block |
||
148 | 157 | } |
149 | 158 | } |
150 | 159 | |
160 | + /** |
|
161 | + * @return string |
|
162 | + */ |
|
151 | 163 | public function getCacheRefreshTime() |
152 | 164 | { |
153 | 165 | global $modx; |
@@ -190,7 +202,7 @@ discard block |
||
190 | 202 | /** |
191 | 203 | * build siteCache file |
192 | 204 | * @param DocumentParser $modx |
193 | - * @return boolean success |
|
205 | + * @return null|boolean success |
|
194 | 206 | */ |
195 | 207 | public function buildCache($modx) |
196 | 208 | { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | /** |
84 | 84 | * Sets the class attribute of the main HTML TABLE. |
85 | 85 | * |
86 | - * @param $value A class for the main HTML TABLE. |
|
86 | + * @param string $value A class for the main HTML TABLE. |
|
87 | 87 | */ |
88 | 88 | function setTableClass($value) { |
89 | 89 | $this->tableClass= $value; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | /** |
129 | 129 | * Sets the class attribute of regular table rows. |
130 | 130 | * |
131 | - * @param $value A class for regular table rows. |
|
131 | + * @param string $value A class for regular table rows. |
|
132 | 132 | */ |
133 | 133 | function setRowRegularClass($value) { |
134 | 134 | $this->rowRegularClass= $value; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | /** |
138 | 138 | * Sets the class attribute of alternate table rows. |
139 | 139 | * |
140 | - * @param $value A class for alternate table rows. |
|
140 | + * @param string $value A class for alternate table rows. |
|
141 | 141 | */ |
142 | 142 | function setRowAlternateClass($value) { |
143 | 143 | $this->rowAlternateClass= $value; |
@@ -213,6 +213,7 @@ discard block |
||
213 | 213 | * |
214 | 214 | * @param $value An Array of column widths in the order of the keys in the |
215 | 215 | * source table array. |
216 | + * @param string[] $widthArray |
|
216 | 217 | */ |
217 | 218 | function setColumnWidths($widthArray) { |
218 | 219 | $this->columnWidths= $widthArray; |
@@ -240,7 +241,7 @@ discard block |
||
240 | 241 | /** |
241 | 242 | * Retrieves the width of a specific table column by index position. |
242 | 243 | * |
243 | - * @param $columnPosition The index of the column to get the width for. |
|
244 | + * @param integer $columnPosition The index of the column to get the width for. |
|
244 | 245 | */ |
245 | 246 | function getColumnWidth($columnPosition) { |
246 | 247 | $currentWidth= ''; |
@@ -254,6 +255,7 @@ discard block |
||
254 | 255 | * Determines what class the current row should have applied. |
255 | 256 | * |
256 | 257 | * @param $value The position of the current row being rendered. |
258 | + * @param integer $position |
|
257 | 259 | */ |
258 | 260 | function determineRowClass($position) { |
259 | 261 | switch ($this->rowAlternatingScheme) { |
@@ -48,6 +48,9 @@ discard block |
||
48 | 48 | Input: url from wich the rss file was fetched |
49 | 49 | Output: true on sucess |
50 | 50 | \*=======================================================================*/ |
51 | + /** |
|
52 | + * @param string $url |
|
53 | + */ |
|
51 | 54 | function set ($url, $rss) { |
52 | 55 | $this->ERROR = ""; |
53 | 56 | $cache_file = $this->file_name( $url ); |
@@ -74,6 +77,9 @@ discard block |
||
74 | 77 | Input: url from wich the rss file was fetched |
75 | 78 | Output: cached object on HIT, false on MISS |
76 | 79 | \*=======================================================================*/ |
80 | + /** |
|
81 | + * @param string $url |
|
82 | + */ |
|
77 | 83 | function get ($url) { |
78 | 84 | $this->ERROR = ""; |
79 | 85 | $cache_file = $this->file_name( $url ); |
@@ -110,6 +116,9 @@ discard block |
||
110 | 116 | Input: url from wich the rss file was fetched |
111 | 117 | Output: cached object on HIT, false on MISS |
112 | 118 | \*=======================================================================*/ |
119 | + /** |
|
120 | + * @param string $url |
|
121 | + */ |
|
113 | 122 | function check_cache ( $url ) { |
114 | 123 | $this->ERROR = ""; |
115 | 124 | $filename = $this->file_name( $url ); |
@@ -156,6 +165,9 @@ discard block |
||
156 | 165 | /*=======================================================================*\ |
157 | 166 | Function: unserialize |
158 | 167 | \*=======================================================================*/ |
168 | + /** |
|
169 | + * @param string $data |
|
170 | + */ |
|
159 | 171 | function unserialize ( $data ) { |
160 | 172 | return unserialize( $data ); |
161 | 173 | } |
@@ -447,6 +447,10 @@ discard block |
||
447 | 447 | /** |
448 | 448 | * return XML parser, and possibly re-encoded source |
449 | 449 | * |
450 | + * @param string $source |
|
451 | + * @param string $out_enc |
|
452 | + * @param string|null $in_enc |
|
453 | + * @param boolean $detect |
|
450 | 454 | */ |
451 | 455 | function create_parser($source, $out_enc, $in_enc, $detect) { |
452 | 456 | if ( substr(phpversion(),0,1) == 5) { |
@@ -556,6 +560,9 @@ discard block |
||
556 | 560 | } |
557 | 561 | } |
558 | 562 | |
563 | + /** |
|
564 | + * @param integer $lvl |
|
565 | + */ |
|
559 | 566 | function error ($errormsg, $lvl=E_USER_WARNING) { |
560 | 567 | // append PHP's error message if track_errors enabled |
561 | 568 | if ( isset($php_errormsg) ) { |
@@ -591,6 +598,9 @@ discard block |
||
591 | 598 | define("CASE_LOWER",0); |
592 | 599 | |
593 | 600 | |
601 | + /** |
|
602 | + * @param integer $case |
|
603 | + */ |
|
594 | 604 | function array_change_key_case($array,$case=CASE_LOWER) { |
595 | 605 | if ($case=CASE_LOWER) $cmd=strtolower; |
596 | 606 | elseif ($case=CASE_UPPER) $cmd=strtoupper; |