@@ -666,6 +666,9 @@ discard block |
||
| 666 | 666 | return json_encode(array('version' => false)); |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | + /** |
|
| 670 | + * @param string $dir |
|
| 671 | + */ |
|
| 669 | 672 | protected function moveUploadFile($file, $dir) { |
| 670 | 673 | $message = $this->checkUploadedFile($file); |
| 671 | 674 | |
@@ -697,6 +700,9 @@ discard block |
||
| 697 | 700 | return "/" . basename($target); |
| 698 | 701 | } |
| 699 | 702 | |
| 703 | + /** |
|
| 704 | + * @param string $file |
|
| 705 | + */ |
|
| 700 | 706 | protected function sendDefaultThumb($file=null) { |
| 701 | 707 | if ($file !== null) { |
| 702 | 708 | $ext = file::getExtension($file); |
@@ -873,6 +879,9 @@ discard block |
||
| 873 | 879 | return ""; |
| 874 | 880 | } |
| 875 | 881 | |
| 882 | + /** |
|
| 883 | + * @param string $message |
|
| 884 | + */ |
|
| 876 | 885 | protected function errorMsg($message, array $data=null) { |
| 877 | 886 | if (in_array($this->action, array("thumb", "upload", "download", "downloadDir"))) |
| 878 | 887 | die($this->label($message, $data)); |
@@ -385,6 +385,9 @@ discard block |
||
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | |
| 388 | + /** |
|
| 389 | + * @return string |
|
| 390 | + */ |
|
| 388 | 391 | protected function normalizeFilename($filename) { |
| 389 | 392 | if ($this->getTransaliasSettings()) { |
| 390 | 393 | $format = strrchr($filename, "."); |
@@ -394,6 +397,9 @@ discard block |
||
| 394 | 397 | return $filename; |
| 395 | 398 | } |
| 396 | 399 | |
| 400 | + /** |
|
| 401 | + * @param string $dirname |
|
| 402 | + */ |
|
| 397 | 403 | protected function normalizeDirname($dirname) { |
| 398 | 404 | return $this->modx->stripAlias($dirname); |
| 399 | 405 | } |
@@ -506,6 +512,9 @@ discard block |
||
| 506 | 512 | return (is_dir($path) && is_readable($path)) ? $return : false; |
| 507 | 513 | } |
| 508 | 514 | |
| 515 | + /** |
|
| 516 | + * @param string $ext |
|
| 517 | + */ |
|
| 509 | 518 | protected function validateExtension($ext, $type) { |
| 510 | 519 | $ext = trim(strtolower($ext)); |
| 511 | 520 | if (!isset($this->types[$type])) |
@@ -531,11 +540,17 @@ discard block |
||
| 531 | 540 | return in_array($ext, $exts); |
| 532 | 541 | } |
| 533 | 542 | |
| 543 | + /** |
|
| 544 | + * @return string |
|
| 545 | + */ |
|
| 534 | 546 | protected function getTypeFromPath($path) { |
| 535 | 547 | return preg_match('/^([^\/]*)\/.*$/', $path, $patt) |
| 536 | 548 | ? $patt[1] : $path; |
| 537 | 549 | } |
| 538 | 550 | |
| 551 | + /** |
|
| 552 | + * @param string $path |
|
| 553 | + */ |
|
| 539 | 554 | protected function removeTypeFromPath($path) { |
| 540 | 555 | return preg_match('/^[^\/]*\/(.*)$/', $path, $patt) |
| 541 | 556 | ? $patt[1] : ""; |
@@ -728,6 +743,9 @@ discard block |
||
| 728 | 743 | die; |
| 729 | 744 | } |
| 730 | 745 | |
| 746 | + /** |
|
| 747 | + * @param string $url |
|
| 748 | + */ |
|
| 731 | 749 | protected function callBack($url, $message="") { |
| 732 | 750 | $message = text::jsValue($message); |
| 733 | 751 | $CKfuncNum = isset($this->opener['CKEditor']['funcNum']) |
@@ -183,6 +183,9 @@ discard block |
||
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | |
| 186 | + /** |
|
| 187 | + * @param integer $n |
|
| 188 | + */ |
|
| 186 | 189 | private function getChars($n) |
| 187 | 190 | { |
| 188 | 191 | $response = null; |
@@ -225,6 +228,9 @@ discard block |
||
| 225 | 228 | } |
| 226 | 229 | |
| 227 | 230 | |
| 231 | + /** |
|
| 232 | + * @param false|string $str |
|
| 233 | + */ |
|
| 228 | 234 | private function readInt($str) |
| 229 | 235 | { |
| 230 | 236 | $size = unpack("C*", $str); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | * The parameter $bigger_size is the bigger dimension (width or height) of calculated sizes. |
| 169 | 169 | * The other dimension (height or width) will be calculated autamaticaly |
| 170 | 170 | * @param integer $bigger_size |
| 171 | - * @return array */ |
|
| 171 | + * @return integer[] */ |
|
| 172 | 172 | |
| 173 | 173 | public function get_prop_size($bigger_size) {
|
| 174 | 174 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * no samo po edno (x ili y) izmerenie |
| 256 | 256 | * @param integer $width |
| 257 | 257 | * @param integer $height |
| 258 | - * @return bool */ |
|
| 258 | + * @return gd */ |
|
| 259 | 259 | |
| 260 | 260 | public function resize_overflow($width, $height) {
|
| 261 | 261 | |
@@ -397,6 +397,12 @@ discard block |
||
| 397 | 397 | return false; |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | + /** |
|
| 401 | + * @param integer $x1 |
|
| 402 | + * @param integer $y1 |
|
| 403 | + * @param integer $x2 |
|
| 404 | + * @param integer $y2 |
|
| 405 | + */ |
|
| 400 | 406 | public function imagefilledrectangle($x1, $y1, $x2, $y2, $color) {
|
| 401 | 407 | $color = $this->gd_color($color); |
| 402 | 408 | if ($color === false) return false; |
@@ -179,7 +179,6 @@ |
||
| 179 | 179 | |
| 180 | 180 | /** Resize and crop the image to fit in given resolution. Returns TRUE on |
| 181 | 181 | * success or FALSE on failure |
| 182 | - * @param mixed $src |
|
| 183 | 182 | * @param integer $offset |
| 184 | 183 | * @return bool */ |
| 185 | 184 | abstract public function resizeCrop($width, $height, $offset=false); |
@@ -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 | |
@@ -31,6 +31,9 @@ discard block |
||
| 31 | 31 | public $renderPagerFnc; |
| 32 | 32 | public $renderPagerFncArgs; |
| 33 | 33 | |
| 34 | + /** |
|
| 35 | + * @param boolean|string $id |
|
| 36 | + */ |
|
| 34 | 37 | public function __construct($id, $ds, $pageSize = 10, $pageNumber = -1) { |
| 35 | 38 | global $_PAGE; // use view state object |
| 36 | 39 | |
@@ -77,6 +80,9 @@ discard block |
||
| 77 | 80 | $this->pageSize = $ps; |
| 78 | 81 | } |
| 79 | 82 | |
| 83 | + /** |
|
| 84 | + * @param DataGrid $fncName |
|
| 85 | + */ |
|
| 80 | 86 | public function setRenderRowFnc($fncName, $args = "") { |
| 81 | 87 | $this->renderRowFnc = &$fncName; |
| 82 | 88 | $this->renderRowFncArgs = $args; // extra agruments |