@@ -327,6 +327,11 @@ |
||
| 327 | 327 | return imagecolorallocate($this->image, $r, $g, $b); |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | + /** |
|
| 331 | + * @param integer $x1 |
|
| 332 | + * @param integer $y1 |
|
| 333 | + * @param boolean $color |
|
| 334 | + */ |
|
| 330 | 335 | protected function imageFilledRectangle($x1, $y1, $x2, $y2, $color) { |
| 331 | 336 | $color = $this->gdColor($color); |
| 332 | 337 | if ($color === false) return false; |
@@ -18,6 +18,9 @@ discard block |
||
| 18 | 18 | protected $root; |
| 19 | 19 | protected $ignored; |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @param string $folder |
|
| 23 | + */ |
|
| 21 | 24 | function __construct($file, $folder, $ignored=null) { |
| 22 | 25 | $this->zip = new ZipArchive(); |
| 23 | 26 | |
@@ -39,6 +42,9 @@ discard block |
||
| 39 | 42 | $this->zip->close(); |
| 40 | 43 | } |
| 41 | 44 | |
| 45 | + /** |
|
| 46 | + * @param string $folder |
|
| 47 | + */ |
|
| 42 | 48 | function zip($folder, $parent=null) { |
| 43 | 49 | $full_path = "{$this->root}$parent$folder"; |
| 44 | 50 | $zip_path = "$parent$folder"; |
@@ -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 | } |
@@ -515,6 +515,9 @@ discard block |
||
| 515 | 515 | $this->setDroptables(false); |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | + /** |
|
| 519 | + * @param boolean $state |
|
| 520 | + */ |
|
| 518 | 521 | public function setDroptables($state) |
| 519 | 522 | { |
| 520 | 523 | $this->_isDroptables = $state; |
@@ -722,6 +725,9 @@ discard block |
||
| 722 | 725 | $_SESSION['result_msg'] = $result_code; |
| 723 | 726 | } |
| 724 | 727 | |
| 728 | +/** |
|
| 729 | + * @param string $dumpstring |
|
| 730 | + */ |
|
| 725 | 731 | function dumpSql(&$dumpstring) |
| 726 | 732 | { |
| 727 | 733 | global $modx; |
@@ -741,6 +747,9 @@ discard block |
||
| 741 | 747 | return true; |
| 742 | 748 | } |
| 743 | 749 | |
| 750 | +/** |
|
| 751 | + * @param string $dumpstring |
|
| 752 | + */ |
|
| 744 | 753 | function snapshot(&$dumpstring) |
| 745 | 754 | { |
| 746 | 755 | global $path; |