@@ -33,6 +33,10 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | if( ! function_exists('parse')) { |
36 | + |
|
37 | + /** |
|
38 | + * @param string $src |
|
39 | + */ |
|
36 | 40 | function parse($src, $ph, $left = '[+', $right = '+]') |
37 | 41 | { |
38 | 42 | foreach ($ph as $k => $v) { |
@@ -18,6 +18,7 @@ |
||
18 | 18 | /** |
19 | 19 | * get_langs_by_key |
20 | 20 | * |
21 | + * @param string $key |
|
21 | 22 | * @return array of languages that define the key in their file |
22 | 23 | */ |
23 | 24 | function get_langs_by_key($key) { |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | * MODX_MANAGER_PATH."includes/extenders/ex_{$extname}.inc.php" |
253 | 253 | * $extname - extension name in lowercase |
254 | 254 | * |
255 | - * @param $extname |
|
255 | + * @param string $extname |
|
256 | 256 | * @param bool $reload |
257 | 257 | * @return bool |
258 | 258 | */ |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | * @param int $count_attempts |
296 | 296 | * @param string $type $type |
297 | 297 | * @param string $responseCode |
298 | - * @return bool |
|
298 | + * @return false|null |
|
299 | 299 | * @global string $base_url |
300 | 300 | * @global string $site_url |
301 | 301 | */ |
@@ -995,7 +995,7 @@ discard block |
||
995 | 995 | } |
996 | 996 | |
997 | 997 | /** |
998 | - * @param $contents |
|
998 | + * @param string $contents |
|
999 | 999 | * @return mixed |
1000 | 1000 | */ |
1001 | 1001 | public function RecoveryEscapedTags($contents) |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | } |
1020 | 1020 | |
1021 | 1021 | /** |
1022 | - * @param $tstart |
|
1022 | + * @param double $tstart |
|
1023 | 1023 | * @return array |
1024 | 1024 | */ |
1025 | 1025 | public function getTimerStats($tstart) |
@@ -1771,7 +1771,7 @@ discard block |
||
1771 | 1771 | |
1772 | 1772 | /** |
1773 | 1773 | * Remove Comment-Tags from output like <!--@- Comment -@--> |
1774 | - * @param $content |
|
1774 | + * @param string $content |
|
1775 | 1775 | * @param string $left |
1776 | 1776 | * @param string $right |
1777 | 1777 | * @return mixed |
@@ -1944,7 +1944,7 @@ discard block |
||
1944 | 1944 | /** |
1945 | 1945 | * Run snippets as per the tags in $documentSource and replace the tags with the returned values. |
1946 | 1946 | * |
1947 | - * @param $content |
|
1947 | + * @param string $content |
|
1948 | 1948 | * @return string |
1949 | 1949 | * @internal param string $documentSource |
1950 | 1950 | */ |
@@ -2977,7 +2977,7 @@ discard block |
||
2977 | 2977 | |
2978 | 2978 | /** |
2979 | 2979 | * @param $templateID |
2980 | - * @return mixed |
|
2980 | + * @return string |
|
2981 | 2981 | */ |
2982 | 2982 | public function _getTemplateCodeFromDB($templateID) |
2983 | 2983 | { |
@@ -3018,9 +3018,9 @@ discard block |
||
3018 | 3018 | } |
3019 | 3019 | |
3020 | 3020 | /** |
3021 | - * @param $id |
|
3021 | + * @param integer $id |
|
3022 | 3022 | * @param int $top |
3023 | - * @return mixed |
|
3023 | + * @return string |
|
3024 | 3024 | */ |
3025 | 3025 | public function getUltimateParentId($id, $top = 0) |
3026 | 3026 | { |
@@ -3351,7 +3351,7 @@ discard block |
||
3351 | 3351 | * |
3352 | 3352 | * @param int $type Types: 1=template, 2=tv, 3=chunk, 4=snippet, 5=plugin, 6=module, 7=resource, 8=role |
3353 | 3353 | * @param int $id Element- / Resource-id |
3354 | - * @return bool |
|
3354 | + * @return false|null |
|
3355 | 3355 | */ |
3356 | 3356 | public function lockElement($type, $id) |
3357 | 3357 | { |
@@ -3373,7 +3373,7 @@ discard block |
||
3373 | 3373 | * @param int $type Types: 1=template, 2=tv, 3=chunk, 4=snippet, 5=plugin, 6=module, 7=resource, 8=role |
3374 | 3374 | * @param int $id Element- / Resource-id |
3375 | 3375 | * @param bool $includeAllUsers true = Deletes not only own user-locks |
3376 | - * @return bool |
|
3376 | + * @return false|null |
|
3377 | 3377 | */ |
3378 | 3378 | public function unlockElement($type, $id, $includeAllUsers = false) |
3379 | 3379 | { |
@@ -3481,7 +3481,7 @@ discard block |
||
3481 | 3481 | * @param array $params |
3482 | 3482 | * @param string $msg |
3483 | 3483 | * @param array $files |
3484 | - * @return mixed |
|
3484 | + * @return boolean |
|
3485 | 3485 | */ |
3486 | 3486 | public function sendmail($params = array(), $msg = '', $files = array()) |
3487 | 3487 | { |
@@ -3977,7 +3977,7 @@ discard block |
||
3977 | 3977 | * |
3978 | 3978 | * @param string $type |
3979 | 3979 | * @param bool $report |
3980 | - * @return bool |
|
3980 | + * @return boolean|null |
|
3981 | 3981 | */ |
3982 | 3982 | public function clearCache($type = '', $report = false) |
3983 | 3983 | { |
@@ -5322,7 +5322,7 @@ discard block |
||
5322 | 5322 | * Remove event listener - only for use within the current execution cycle |
5323 | 5323 | * |
5324 | 5324 | * @param string $evtName |
5325 | - * @return boolean |
|
5325 | + * @return false|null |
|
5326 | 5326 | */ |
5327 | 5327 | public function removeEventListener($evtName) |
5328 | 5328 | { |
@@ -5346,7 +5346,7 @@ discard block |
||
5346 | 5346 | * |
5347 | 5347 | * @param string $evtName |
5348 | 5348 | * @param array $extParams Parameters available to plugins. Each array key will be the PHP variable name, and the array value will be the variable value. |
5349 | - * @return boolean|array |
|
5349 | + * @return false|null |
|
5350 | 5350 | */ |
5351 | 5351 | public function invokeEvent($evtName, $extParams = array()) |
5352 | 5352 | { |
@@ -5767,7 +5767,7 @@ discard block |
||
5767 | 5767 | |
5768 | 5768 | /** |
5769 | 5769 | * @param string $string |
5770 | - * @return mixed|string |
|
5770 | + * @return string |
|
5771 | 5771 | */ |
5772 | 5772 | public function removeSanitizeSeed($string = '') |
5773 | 5773 | { |
@@ -5782,7 +5782,7 @@ discard block |
||
5782 | 5782 | |
5783 | 5783 | /** |
5784 | 5784 | * @param string $content |
5785 | - * @return mixed|string |
|
5785 | + * @return string |
|
5786 | 5786 | */ |
5787 | 5787 | public function cleanUpMODXTags($content = '') |
5788 | 5788 | { |
@@ -5945,7 +5945,7 @@ discard block |
||
5945 | 5945 | |
5946 | 5946 | /** |
5947 | 5947 | * @param string $str |
5948 | - * @return bool|mixed|string |
|
5948 | + * @return string |
|
5949 | 5949 | */ |
5950 | 5950 | public function atBindFileContent($str = '') |
5951 | 5951 | { |
@@ -5996,8 +5996,8 @@ discard block |
||
5996 | 5996 | } |
5997 | 5997 | |
5998 | 5998 | /** |
5999 | - * @param $str |
|
6000 | - * @return bool|string |
|
5999 | + * @param string $str |
|
6000 | + * @return false|string |
|
6001 | 6001 | */ |
6002 | 6002 | public function getExtFromFilename($str) |
6003 | 6003 | { |
@@ -6025,7 +6025,7 @@ discard block |
||
6025 | 6025 | * @param string $text Error message |
6026 | 6026 | * @param string $file File where the error was detected |
6027 | 6027 | * @param string $line Line number within $file |
6028 | - * @return boolean |
|
6028 | + * @return boolean|null |
|
6029 | 6029 | */ |
6030 | 6030 | public function phpError($nr, $text, $file, $line) |
6031 | 6031 | { |
@@ -6077,7 +6077,7 @@ discard block |
||
6077 | 6077 | * @param string $text |
6078 | 6078 | * @param string $line |
6079 | 6079 | * @param string $output |
6080 | - * @return bool |
|
6080 | + * @return null|boolean |
|
6081 | 6081 | */ |
6082 | 6082 | public function messageQuit($msg = 'unspecified error', $query = '', $is_error = true, $nr = '', $file = '', $source = '', $text = '', $line = '', $output = '') |
6083 | 6083 | { |
@@ -6499,7 +6499,7 @@ discard block |
||
6499 | 6499 | |
6500 | 6500 | /** |
6501 | 6501 | * @param string $str |
6502 | - * @return bool|mixed|string |
|
6502 | + * @return string |
|
6503 | 6503 | */ |
6504 | 6504 | public function atBindInclude($str = '') |
6505 | 6505 | { |
@@ -6550,7 +6550,7 @@ discard block |
||
6550 | 6550 | * @param $str |
6551 | 6551 | * @param int $flags |
6552 | 6552 | * @param string $encode |
6553 | - * @return mixed |
|
6553 | + * @return string |
|
6554 | 6554 | */ |
6555 | 6555 | public function htmlspecialchars($str, $flags = ENT_COMPAT, $encode = '') |
6556 | 6556 | { |
@@ -6559,7 +6559,7 @@ discard block |
||
6559 | 6559 | } |
6560 | 6560 | |
6561 | 6561 | /** |
6562 | - * @param $string |
|
6562 | + * @param string $string |
|
6563 | 6563 | * @param bool $returnData |
6564 | 6564 | * @return bool|mixed |
6565 | 6565 | */ |
@@ -452,6 +452,7 @@ discard block |
||
452 | 452 | * @name: getColumn |
453 | 453 | * @desc: returns an array of the values found on colun $name |
454 | 454 | * @param: $dsq - dataset or query string |
455 | + * @param string $name |
|
455 | 456 | */ |
456 | 457 | function getColumn($name, $dsq) { |
457 | 458 | if (!is_resource($dsq)) |
@@ -601,6 +602,9 @@ discard block |
||
601 | 602 | return $result; |
602 | 603 | } |
603 | 604 | |
605 | + /** |
|
606 | + * @param string $table_name |
|
607 | + */ |
|
604 | 608 | function optimize($table_name) |
605 | 609 | { |
606 | 610 | $rs = $this->query("OPTIMIZE TABLE {$table_name}"); |
@@ -618,6 +622,9 @@ discard block |
||
618 | 622 | return mysql_data_seek($result, $row_number); |
619 | 623 | } |
620 | 624 | |
625 | + /** |
|
626 | + * @return string |
|
627 | + */ |
|
621 | 628 | function _getFieldsStringFromArray($fields=array()) { |
622 | 629 | |
623 | 630 | if(empty($fields)) return '*'; |
@@ -630,6 +637,9 @@ discard block |
||
630 | 637 | return join(',', $_); |
631 | 638 | } |
632 | 639 | |
640 | + /** |
|
641 | + * @return string |
|
642 | + */ |
|
633 | 643 | function _getFromStringFromArray($tables=array()) { |
634 | 644 | $_ = array(); |
635 | 645 | foreach($tables as $k=>$v) { |
@@ -291,6 +291,9 @@ discard block |
||
291 | 291 | } |
292 | 292 | } |
293 | 293 | |
294 | + /** |
|
295 | + * @param string $name |
|
296 | + */ |
|
294 | 297 | function getColumn($name, $dsq) { |
295 | 298 | if (!is_object($dsq)) { |
296 | 299 | $dsq = $this->query($dsq); |
@@ -375,6 +378,9 @@ discard block |
||
375 | 378 | return $rsArray; |
376 | 379 | } |
377 | 380 | |
381 | + /** |
|
382 | + * @return string |
|
383 | + */ |
|
378 | 384 | function getVersion() { |
379 | 385 | return $this->conn->server_info; |
380 | 386 | } |
@@ -393,6 +399,9 @@ discard block |
||
393 | 399 | return $result; |
394 | 400 | } |
395 | 401 | |
402 | + /** |
|
403 | + * @param string $table_name |
|
404 | + */ |
|
396 | 405 | function optimize($table_name) { |
397 | 406 | $rs = $this->query("OPTIMIZE TABLE {$table_name}"); |
398 | 407 | if ($rs) { |
@@ -410,6 +419,9 @@ discard block |
||
410 | 419 | return $result->data_seek($row_number); |
411 | 420 | } |
412 | 421 | |
422 | + /** |
|
423 | + * @return string |
|
424 | + */ |
|
413 | 425 | function _getFieldsStringFromArray($fields=array()) { |
414 | 426 | |
415 | 427 | if(empty($fields)) return '*'; |
@@ -422,6 +434,9 @@ discard block |
||
422 | 434 | return join(',', $_); |
423 | 435 | } |
424 | 436 | |
437 | + /** |
|
438 | + * @return string |
|
439 | + */ |
|
425 | 440 | function _getFromStringFromArray($tables=array()) { |
426 | 441 | $_ = array(); |
427 | 442 | foreach($tables as $k=>$v) { |
@@ -24,6 +24,11 @@ discard block |
||
24 | 24 | $this->condModifiers = '=,is,eq,equals,ne,neq,notequals,isnot,isnt,not,%,isempty,isnotempty,isntempty,>=,gte,eg,gte,greaterthan,>,gt,isgreaterthan,isgt,lowerthan,<,lt,<=,lte,islte,islowerthan,islt,el,find,in,inarray,in_array,fnmatch,wcard,wcard_match,wildcard,wildcard_match,is_file,is_dir,file_exists,is_readable,is_writable,is_image,regex,preg,preg_match,memberof,mo,isinrole,ir'; |
25 | 25 | } |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $key |
|
29 | + * @param string $value |
|
30 | + * @param string|false $modifiers |
|
31 | + */ |
|
27 | 32 | function phxFilter($key,$value,$modifiers) |
28 | 33 | { |
29 | 34 | global $modx; |
@@ -45,6 +50,10 @@ discard block |
||
45 | 50 | return $value; |
46 | 51 | } |
47 | 52 | |
53 | + /** |
|
54 | + * @param string $mode |
|
55 | + * @param string $modifiers |
|
56 | + */ |
|
48 | 57 | function _getDelim($mode,$modifiers) { |
49 | 58 | $c = substr($modifiers,0,1); |
50 | 59 | if(!in_array($c, array('"', "'", '`')) ) return false; |
@@ -56,6 +65,11 @@ discard block |
||
56 | 65 | return $c; |
57 | 66 | } |
58 | 67 | |
68 | + /** |
|
69 | + * @param string $mode |
|
70 | + * @param false|string $delim |
|
71 | + * @param string $modifiers |
|
72 | + */ |
|
59 | 73 | function _getOpt($mode,$delim,$modifiers) { |
60 | 74 | if($delim) { |
61 | 75 | if($mode=='(') return substr($modifiers,1,strpos($modifiers, $delim . ')' )-1); |
@@ -74,6 +88,14 @@ discard block |
||
74 | 88 | return $opt; |
75 | 89 | } |
76 | 90 | } |
91 | + |
|
92 | + /** |
|
93 | + * @param string $mode |
|
94 | + * @param false|string $delim |
|
95 | + * @param string $modifiers |
|
96 | + * |
|
97 | + * @return string |
|
98 | + */ |
|
77 | 99 | function _getRemainModifiers($mode,$delim,$modifiers) { |
78 | 100 | if($delim) { |
79 | 101 | if($mode=='(') |
@@ -101,6 +123,9 @@ discard block |
||
101 | 123 | return substr($string,strpos($string, $delim)+$len); |
102 | 124 | } |
103 | 125 | |
126 | + /** |
|
127 | + * @param string $modifiers |
|
128 | + */ |
|
104 | 129 | function splitEachModifiers($modifiers) { |
105 | 130 | global $modx; |
106 | 131 | |
@@ -234,6 +259,9 @@ discard block |
||
234 | 259 | else return true; |
235 | 260 | } |
236 | 261 | |
262 | + /** |
|
263 | + * @param string $cmd |
|
264 | + */ |
|
237 | 265 | function getValueFromPreset($key, $value, $cmd, $opt) |
238 | 266 | { |
239 | 267 | global $modx; |
@@ -920,6 +948,9 @@ discard block |
||
920 | 948 | return $value; |
921 | 949 | } |
922 | 950 | |
951 | + /** |
|
952 | + * @param string $cmd |
|
953 | + */ |
|
923 | 954 | function includeMdfFile($cmd) { |
924 | 955 | global $modx; |
925 | 956 | $key = $this->key; |
@@ -1075,6 +1106,10 @@ discard block |
||
1075 | 1106 | } |
1076 | 1107 | |
1077 | 1108 | // Sets a placeholder variable which can only be access by Modifiers |
1109 | + |
|
1110 | + /** |
|
1111 | + * @param string $value |
|
1112 | + */ |
|
1078 | 1113 | function setModifiersVariable($key, $value) { |
1079 | 1114 | if ($key != 'phx' && $key != 'dummy') $this->placeholders[$key] = $value; |
1080 | 1115 | } |
@@ -6,6 +6,9 @@ |
||
6 | 6 | { |
7 | 7 | } |
8 | 8 | |
9 | + /** |
|
10 | + * @param integer $flags |
|
11 | + */ |
|
9 | 12 | function htmlspecialchars($str='', $flags = ENT_COMPAT, $encode='') |
10 | 13 | { |
11 | 14 | global $modx; |