@@ -346,7 +346,7 @@ |
||
| 346 | 346 | |
| 347 | 347 | /** |
| 348 | 348 | * @param string $filepath |
| 349 | - * @return bool|string |
|
| 349 | + * @return null|string |
|
| 350 | 350 | */ |
| 351 | 351 | function getFileContent($filepath) |
| 352 | 352 | { |
@@ -72,6 +72,10 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public $cdelim; |
| 74 | 74 | |
| 75 | + /** |
|
| 76 | + * @param null|string $id |
|
| 77 | + * @param string $ds |
|
| 78 | + */ |
|
| 75 | 79 | public function __construct($id, $ds, $pageSize = 20, $pageNumber = -1) |
| 76 | 80 | { |
| 77 | 81 | global $__DataGridCnt; |
@@ -212,6 +216,9 @@ discard block |
||
| 212 | 216 | |
| 213 | 217 | // format column values |
| 214 | 218 | |
| 219 | + /** |
|
| 220 | + * @param integer $n |
|
| 221 | + */ |
|
| 215 | 222 | public function RenderRowFnc($n, $row) |
| 216 | 223 | { |
| 217 | 224 | if ($this->_alt == 0) { |
@@ -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 | { |
| 36 | 39 | global $_PAGE; // use view state object |
@@ -82,6 +85,9 @@ discard block |
||
| 82 | 85 | $this->pageSize = $ps; |
| 83 | 86 | } |
| 84 | 87 | |
| 88 | + /** |
|
| 89 | + * @param DataGrid $fncName |
|
| 90 | + */ |
|
| 85 | 91 | public function setRenderRowFnc($fncName, $args = "") |
| 86 | 92 | { |
| 87 | 93 | $this->renderRowFnc = &$fncName; |
@@ -412,6 +412,9 @@ discard block |
||
| 412 | 412 | } |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | + /** |
|
| 416 | + * @param string $table |
|
| 417 | + */ |
|
| 415 | 418 | public function save($fields, $table, $where = '') |
| 416 | 419 | { |
| 417 | 420 | if ($where === '') { |
@@ -441,6 +444,7 @@ discard block |
||
| 441 | 444 | /** |
| 442 | 445 | * @name: freeResult |
| 443 | 446 | * |
| 447 | + * @param mysqli_result $rs |
|
| 444 | 448 | */ |
| 445 | 449 | public function freeResult($rs) |
| 446 | 450 | { |
@@ -551,6 +555,7 @@ discard block |
||
| 551 | 555 | * @name: getColumn |
| 552 | 556 | * @desc: returns an array of the values found on colun $name |
| 553 | 557 | * @param: $dsq - dataset or query string |
| 558 | + * @param string $name |
|
| 554 | 559 | */ |
| 555 | 560 | public function getColumn($name, $dsq) |
| 556 | 561 | { |
@@ -716,6 +721,9 @@ discard block |
||
| 716 | 721 | return $result; |
| 717 | 722 | } |
| 718 | 723 | |
| 724 | + /** |
|
| 725 | + * @param string $table_name |
|
| 726 | + */ |
|
| 719 | 727 | public function optimize($table_name) |
| 720 | 728 | { |
| 721 | 729 | $rs = $this->query("OPTIMIZE TABLE {$table_name}"); |
@@ -726,6 +734,9 @@ discard block |
||
| 726 | 734 | return $rs; |
| 727 | 735 | } |
| 728 | 736 | |
| 737 | + /** |
|
| 738 | + * @param string $table_name |
|
| 739 | + */ |
|
| 729 | 740 | public function truncate($table_name) |
| 730 | 741 | { |
| 731 | 742 | $rs = $this->query("TRUNCATE {$table_name}"); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** |
| 102 | 102 | * @param string $mode |
| 103 | 103 | * @param string $modifiers |
| 104 | - * @return bool|string |
|
| 104 | + * @return false|string |
|
| 105 | 105 | */ |
| 106 | 106 | public function _getDelim($mode, $modifiers) |
| 107 | 107 | { |
@@ -149,6 +149,14 @@ discard block |
||
| 149 | 149 | return $opt; |
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | + |
|
| 153 | + /** |
|
| 154 | + * @param string $mode |
|
| 155 | + * @param false|string $delim |
|
| 156 | + * @param string $modifiers |
|
| 157 | + * |
|
| 158 | + * @return string |
|
| 159 | + */ |
|
| 152 | 160 | public function _getRemainModifiers($mode, $delim, $modifiers) |
| 153 | 161 | { |
| 154 | 162 | if ($delim) { |
@@ -182,6 +190,9 @@ discard block |
||
| 182 | 190 | return substr($string, strpos($string, $delim)+$len); |
| 183 | 191 | } |
| 184 | 192 | |
| 193 | + /** |
|
| 194 | + * @param string $modifiers |
|
| 195 | + */ |
|
| 185 | 196 | public function splitEachModifiers($modifiers) |
| 186 | 197 | { |
| 187 | 198 | $modx = evolutionCMS(); |
@@ -253,6 +264,10 @@ discard block |
||
| 253 | 264 | return $result; |
| 254 | 265 | } |
| 255 | 266 | |
| 267 | + /** |
|
| 268 | + * @param string $key |
|
| 269 | + * @param string $value |
|
| 270 | + */ |
|
| 256 | 271 | public function parsePhx($key, $value, $modifiers) |
| 257 | 272 | { |
| 258 | 273 | $modx = evolutionCMS(); |
@@ -332,6 +347,10 @@ discard block |
||
| 332 | 347 | } |
| 333 | 348 | } |
| 334 | 349 | |
| 350 | + /** |
|
| 351 | + * @param string $cmd |
|
| 352 | + * @param string $opt |
|
| 353 | + */ |
|
| 335 | 354 | public function getValueFromPreset($key, $value, $cmd, $opt) |
| 336 | 355 | { |
| 337 | 356 | $modx = evolutionCMS(); |
@@ -1185,6 +1204,9 @@ discard block |
||
| 1185 | 1204 | return $value; |
| 1186 | 1205 | } |
| 1187 | 1206 | |
| 1207 | + /** |
|
| 1208 | + * @param string $cmd |
|
| 1209 | + */ |
|
| 1188 | 1210 | public function includeMdfFile($cmd) |
| 1189 | 1211 | { |
| 1190 | 1212 | $modx = evolutionCMS(); |
@@ -1374,6 +1396,10 @@ discard block |
||
| 1374 | 1396 | } |
| 1375 | 1397 | |
| 1376 | 1398 | // Sets a placeholder variable which can only be access by Modifiers |
| 1399 | + |
|
| 1400 | + /** |
|
| 1401 | + * @param string $value |
|
| 1402 | + */ |
|
| 1377 | 1403 | public function setModifiersVariable($key, $value) |
| 1378 | 1404 | { |
| 1379 | 1405 | if ($key != 'phx' && $key != 'dummy') { |
@@ -382,7 +382,7 @@ |
||
| 382 | 382 | } // end renderFormElement function |
| 383 | 383 | |
| 384 | 384 | /** |
| 385 | - * @param string|array|mysqli_result $v |
|
| 385 | + * @param string $v |
|
| 386 | 386 | * @return array |
| 387 | 387 | */ |
| 388 | 388 | function ParseIntputOptions($v) |
@@ -783,6 +783,9 @@ discard block |
||
| 783 | 783 | } |
| 784 | 784 | } |
| 785 | 785 | |
| 786 | + /** |
|
| 787 | + * @param string $dir |
|
| 788 | + */ |
|
| 786 | 789 | protected function moveUploadFile($file, $dir) |
| 787 | 790 | { |
| 788 | 791 | $message = $this->checkUploadedFile($file); |
@@ -817,6 +820,9 @@ discard block |
||
| 817 | 820 | return "/" . basename($target); |
| 818 | 821 | } |
| 819 | 822 | |
| 823 | + /** |
|
| 824 | + * @param string $file |
|
| 825 | + */ |
|
| 820 | 826 | protected function sendDefaultThumb($file=null) |
| 821 | 827 | { |
| 822 | 828 | if ($file !== null) { |
@@ -1028,6 +1034,9 @@ discard block |
||
| 1028 | 1034 | return ""; |
| 1029 | 1035 | } |
| 1030 | 1036 | |
| 1037 | + /** |
|
| 1038 | + * @param string $message |
|
| 1039 | + */ |
|
| 1031 | 1040 | protected function errorMsg($message, array $data=null) |
| 1032 | 1041 | { |
| 1033 | 1042 | if (in_array($this->action, array("thumb", "upload", "download", "downloadDir"))) { |
@@ -427,6 +427,9 @@ discard block |
||
| 427 | 427 | } |
| 428 | 428 | |
| 429 | 429 | |
| 430 | + /** |
|
| 431 | + * @return string |
|
| 432 | + */ |
|
| 430 | 433 | protected function normalizeFilename($filename) |
| 431 | 434 | { |
| 432 | 435 | if ($this->getTransaliasSettings()) { |
@@ -437,6 +440,9 @@ discard block |
||
| 437 | 440 | return $filename; |
| 438 | 441 | } |
| 439 | 442 | |
| 443 | + /** |
|
| 444 | + * @param string $dirname |
|
| 445 | + */ |
|
| 440 | 446 | protected function normalizeDirname($dirname) |
| 441 | 447 | { |
| 442 | 448 | return $this->modx->stripAlias($dirname); |
@@ -566,6 +572,9 @@ discard block |
||
| 566 | 572 | return (is_dir($path) && is_readable($path)) ? $return : false; |
| 567 | 573 | } |
| 568 | 574 | |
| 575 | + /** |
|
| 576 | + * @param string $ext |
|
| 577 | + */ |
|
| 569 | 578 | protected function validateExtension($ext, $type) |
| 570 | 579 | { |
| 571 | 580 | $ext = trim(strtolower($ext)); |
@@ -595,12 +604,18 @@ discard block |
||
| 595 | 604 | return in_array($ext, $exts); |
| 596 | 605 | } |
| 597 | 606 | |
| 607 | + /** |
|
| 608 | + * @return string |
|
| 609 | + */ |
|
| 598 | 610 | protected function getTypeFromPath($path) |
| 599 | 611 | { |
| 600 | 612 | return preg_match('/^([^\/]*)\/.*$/', $path, $patt) |
| 601 | 613 | ? $patt[1] : $path; |
| 602 | 614 | } |
| 603 | 615 | |
| 616 | + /** |
|
| 617 | + * @param string $path |
|
| 618 | + */ |
|
| 604 | 619 | protected function removeTypeFromPath($path) |
| 605 | 620 | { |
| 606 | 621 | return preg_match('/^[^\/]*\/(.*)$/', $path, $patt) |
@@ -811,6 +826,9 @@ discard block |
||
| 811 | 826 | die; |
| 812 | 827 | } |
| 813 | 828 | |
| 829 | + /** |
|
| 830 | + * @param string $url |
|
| 831 | + */ |
|
| 814 | 832 | protected function callBack($url, $message="") |
| 815 | 833 | { |
| 816 | 834 | $message = text::jsValue($message); |
@@ -177,6 +177,9 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | |
| 180 | + /** |
|
| 181 | + * @param integer $n |
|
| 182 | + */ |
|
| 180 | 183 | private function getChars($n) |
| 181 | 184 | { |
| 182 | 185 | $response = null; |
@@ -214,6 +217,9 @@ discard block |
||
| 214 | 217 | } |
| 215 | 218 | |
| 216 | 219 | |
| 220 | + /** |
|
| 221 | + * @param false|string $str |
|
| 222 | + */ |
|
| 217 | 223 | private function readInt($str) |
| 218 | 224 | { |
| 219 | 225 | $size = unpack("C*", $str); |