@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | /** |
| 177 | 177 | * Clear all the commands already added to the response |
| 178 | 178 | * |
| 179 | - * @return \Jaxon\Plugin\Response |
|
| 179 | + * @return Response |
|
| 180 | 180 | */ |
| 181 | 181 | public function clearCommands() |
| 182 | 182 | { |
@@ -190,9 +190,9 @@ discard block |
||
| 190 | 190 | * |
| 191 | 191 | * @param \Jaxon\Plugin\Plugin $xPlugin The plugin object |
| 192 | 192 | * @param array $aAttributes The attributes for this response command |
| 193 | - * @param mixed $mData The data to be sent with this command |
|
| 193 | + * @param string $mData The data to be sent with this command |
|
| 194 | 194 | * |
| 195 | - * @return \Jaxon\Plugin\Response |
|
| 195 | + * @return Response |
|
| 196 | 196 | */ |
| 197 | 197 | public function addPluginCommand($xPlugin, $aAttributes, $mData) |
| 198 | 198 | { |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | * @param integer $iCmdNumber The number of commands to skip upon cancel |
| 252 | 252 | * @param string $sMessage The message to display to the user |
| 253 | 253 | * |
| 254 | - * @return \Jaxon\Plugin\Response |
|
| 254 | + * @return Response |
|
| 255 | 255 | */ |
| 256 | 256 | public function confirmCommands($iCmdNumber, $sMessage) |
| 257 | 257 | { |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | * @param string $sAttribute The attribute to be assigned |
| 272 | 272 | * @param string $sData The value to be assigned to the attribute |
| 273 | 273 | * |
| 274 | - * @return \Jaxon\Plugin\Response |
|
| 274 | + * @return Response |
|
| 275 | 275 | */ |
| 276 | 276 | public function assign($sTarget, $sAttribute, $sData) |
| 277 | 277 | { |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | * @param string $sTarget The id of the html element on the browser |
| 294 | 294 | * @param string $sData The value to be assigned to the attribute |
| 295 | 295 | * |
| 296 | - * @return \Jaxon\Plugin\Response |
|
| 296 | + * @return Response |
|
| 297 | 297 | */ |
| 298 | 298 | public function html($sTarget, $sData) |
| 299 | 299 | { |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | * @param string $sAttribute The name of the attribute to be appended to |
| 308 | 308 | * @param string $sData The data to be appended to the attribute |
| 309 | 309 | * |
| 310 | - * @return \Jaxon\Plugin\Response |
|
| 310 | + * @return Response |
|
| 311 | 311 | */ |
| 312 | 312 | public function append($sTarget, $sAttribute, $sData) |
| 313 | 313 | { |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | * @param string $sAttribute The name of the attribute to be prepended to |
| 329 | 329 | * @param string $sData The value to be prepended to the attribute |
| 330 | 330 | * |
| 331 | - * @return \Jaxon\Plugin\Response |
|
| 331 | + * @return Response |
|
| 332 | 332 | */ |
| 333 | 333 | public function prepend($sTarget, $sAttribute, $sData) |
| 334 | 334 | { |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | * @param string $sSearch The needle to search for |
| 351 | 351 | * @param string $sData The data to use in place of the needle |
| 352 | 352 | * |
| 353 | - * @return \Jaxon\Plugin\Response |
|
| 353 | + * @return Response |
|
| 354 | 354 | */ |
| 355 | 355 | public function replace($sTarget, $sAttribute, $sSearch, $sData) |
| 356 | 356 | { |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | * @param string $sTarget The id of the element to be updated. |
| 374 | 374 | * @param string $sAttribute The attribute to be cleared |
| 375 | 375 | * |
| 376 | - * @return \Jaxon\Plugin\Response |
|
| 376 | + * @return Response |
|
| 377 | 377 | */ |
| 378 | 378 | public function clear($sTarget, $sAttribute) |
| 379 | 379 | { |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | * @param string $sAttribute The attribute to be updated |
| 390 | 390 | * @param string $sData The value to assign |
| 391 | 391 | * |
| 392 | - * @return \Jaxon\Plugin\Response |
|
| 392 | + * @return Response |
|
| 393 | 393 | */ |
| 394 | 394 | public function contextAssign($sAttribute, $sData) |
| 395 | 395 | { |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | * @param string $sAttribute The attribute to be appended to |
| 412 | 412 | * @param string $sData The value to append |
| 413 | 413 | * |
| 414 | - * @return \Jaxon\Plugin\Response |
|
| 414 | + * @return Response |
|
| 415 | 415 | */ |
| 416 | 416 | public function contextAppend($sAttribute, $sData) |
| 417 | 417 | { |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | * @param string $sAttribute The attribute to be updated |
| 434 | 434 | * @param string $sData The value to be prepended |
| 435 | 435 | * |
| 436 | - * @return \Jaxon\Plugin\Response |
|
| 436 | + * @return Response |
|
| 437 | 437 | */ |
| 438 | 438 | public function contextPrepend($sAttribute, $sData) |
| 439 | 439 | { |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | * |
| 455 | 455 | * @param string $sAttribute The attribute to be cleared |
| 456 | 456 | * |
| 457 | - * @return \Jaxon\Plugin\Response |
|
| 457 | + * @return Response |
|
| 458 | 458 | */ |
| 459 | 459 | public function contextClear($sAttribute) |
| 460 | 460 | { |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | * |
| 467 | 467 | * @param string $sMessage The message to be displayed |
| 468 | 468 | * |
| 469 | - * @return \Jaxon\Plugin\Response |
|
| 469 | + * @return Response |
|
| 470 | 470 | */ |
| 471 | 471 | public function alert($sMessage) |
| 472 | 472 | { |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | * |
| 484 | 484 | * @param string $sMessage The message to be displayed |
| 485 | 485 | * |
| 486 | - * @return \Jaxon\Plugin\Response |
|
| 486 | + * @return Response |
|
| 487 | 487 | */ |
| 488 | 488 | public function debug($sMessage) |
| 489 | 489 | { |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | * @param string $sURL The relative or fully qualified URL |
| 502 | 502 | * @param integer $iDelay Number of seconds to delay before the redirect occurs |
| 503 | 503 | * |
| 504 | - * @return \Jaxon\Plugin\Response |
|
| 504 | + * @return Response |
|
| 505 | 505 | */ |
| 506 | 506 | public function redirect($sURL, $iDelay=0) |
| 507 | 507 | { |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | * |
| 555 | 555 | * @param string $sJS The script to execute |
| 556 | 556 | * |
| 557 | - * @return \Jaxon\Plugin\Response |
|
| 557 | + * @return Response |
|
| 558 | 558 | */ |
| 559 | 559 | public function script($sJS) |
| 560 | 560 | { |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | * |
| 572 | 572 | * @param string $sFunc The name of the function to call |
| 573 | 573 | * |
| 574 | - * @return \Jaxon\Plugin\Response |
|
| 574 | + * @return Response |
|
| 575 | 575 | */ |
| 576 | 576 | public function call($sFunc) |
| 577 | 577 | { |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | * |
| 592 | 592 | * @param string $sTarget The id of the element to be removed |
| 593 | 593 | * |
| 594 | - * @return \Jaxon\Plugin\Response |
|
| 594 | + * @return Response |
|
| 595 | 595 | */ |
| 596 | 596 | public function remove($sTarget) |
| 597 | 597 | { |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | * @param string $sTag The tag name to be used for the new element |
| 612 | 612 | * @param string $sId The id to assign to the new element |
| 613 | 613 | * |
| 614 | - * @return \Jaxon\Plugin\Response |
|
| 614 | + * @return Response |
|
| 615 | 615 | */ |
| 616 | 616 | public function create($sParent, $sTag, $sId) |
| 617 | 617 | { |
@@ -632,7 +632,7 @@ discard block |
||
| 632 | 632 | * @param string $sTag The tag name to be used for the new element |
| 633 | 633 | * @param string $sId The id to assign to the new element |
| 634 | 634 | * |
| 635 | - * @return \Jaxon\Plugin\Response |
|
| 635 | + * @return Response |
|
| 636 | 636 | */ |
| 637 | 637 | public function insert($sBefore, $sTag, $sId) |
| 638 | 638 | { |
@@ -653,7 +653,7 @@ discard block |
||
| 653 | 653 | * @param string $sTag The tag name to be used for the new element |
| 654 | 654 | * @param string $sId The id to assign to the new element |
| 655 | 655 | * |
| 656 | - * @return \Jaxon\Plugin\Response |
|
| 656 | + * @return Response |
|
| 657 | 657 | */ |
| 658 | 658 | public function insertAfter($sAfter, $sTag, $sId) |
| 659 | 659 | { |
@@ -675,7 +675,7 @@ discard block |
||
| 675 | 675 | * @param string $sName The name of the new input element |
| 676 | 676 | * @param string $sId The id of the new element |
| 677 | 677 | * |
| 678 | - * @return \Jaxon\Plugin\Response |
|
| 678 | + * @return Response |
|
| 679 | 679 | */ |
| 680 | 680 | public function createInput($sParent, $sType, $sName, $sId) |
| 681 | 681 | { |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | * @param string $sName The name of the new input element |
| 699 | 699 | * @param string $sId The id of the new element |
| 700 | 700 | * |
| 701 | - * @return \Jaxon\Plugin\Response |
|
| 701 | + * @return Response |
|
| 702 | 702 | */ |
| 703 | 703 | public function insertInput($sBefore, $sType, $sName, $sId) |
| 704 | 704 | { |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | * @param string $sName The name of the new input element |
| 722 | 722 | * @param string $sId The id of the new element |
| 723 | 723 | * |
| 724 | - * @return \Jaxon\Plugin\Response |
|
| 724 | + * @return Response |
|
| 725 | 725 | */ |
| 726 | 726 | public function insertInputAfter($sAfter, $sType, $sName, $sId) |
| 727 | 727 | { |
@@ -743,7 +743,7 @@ discard block |
||
| 743 | 743 | * @param string $sEvent The name of the event |
| 744 | 744 | * @param string $sScript The javascript to execute when the event is fired |
| 745 | 745 | * |
| 746 | - * @return \Jaxon\Plugin\Response |
|
| 746 | + * @return Response |
|
| 747 | 747 | */ |
| 748 | 748 | public function setEvent($sTarget, $sEvent, $sScript) |
| 749 | 749 | { |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | * @param string $sTarget The id of the element that contains the event |
| 764 | 764 | * @param string $sScript The javascript to execute when the event is fired |
| 765 | 765 | * |
| 766 | - * @return \Jaxon\Plugin\Response |
|
| 766 | + * @return Response |
|
| 767 | 767 | */ |
| 768 | 768 | public function onClick($sTarget, $sScript) |
| 769 | 769 | { |
@@ -779,7 +779,7 @@ discard block |
||
| 779 | 779 | * @param string $sEvent The name of the event |
| 780 | 780 | * @param string $sHandler The name of the javascript function to call when the event is fired |
| 781 | 781 | * |
| 782 | - * @return \Jaxon\Plugin\Response |
|
| 782 | + * @return Response |
|
| 783 | 783 | */ |
| 784 | 784 | public function addHandler($sTarget, $sEvent, $sHandler) |
| 785 | 785 | { |
@@ -800,7 +800,7 @@ discard block |
||
| 800 | 800 | * @param string $sEvent The name of the event |
| 801 | 801 | * @param string $sHandler The name of the javascript function called when the event is fired |
| 802 | 802 | * |
| 803 | - * @return \Jaxon\Plugin\Response |
|
| 803 | + * @return Response |
|
| 804 | 804 | */ |
| 805 | 805 | public function removeHandler($sTarget, $sEvent, $sHandler) |
| 806 | 806 | { |
@@ -821,7 +821,7 @@ discard block |
||
| 821 | 821 | * @param string $sArgs Comma separated list of parameter names |
| 822 | 822 | * @param string $sScript The javascript code that will become the body of the function |
| 823 | 823 | * |
| 824 | - * @return \Jaxon\Plugin\Response |
|
| 824 | + * @return Response |
|
| 825 | 825 | */ |
| 826 | 826 | public function setFunction($sFunction, $sArgs, $sScript) |
| 827 | 827 | { |
@@ -848,7 +848,7 @@ discard block |
||
| 848 | 848 | * @param string $sReturnValueVar The name of the variable that will retain the return value |
| 849 | 849 | * from the call to the original function |
| 850 | 850 | * |
| 851 | - * @return \Jaxon\Plugin\Response |
|
| 851 | + * @return Response |
|
| 852 | 852 | */ |
| 853 | 853 | public function wrapFunction($sFunction, $sArgs, $aScripts, $sReturnValueVar) |
| 854 | 854 | { |
@@ -869,7 +869,7 @@ discard block |
||
| 869 | 869 | * @param string $sFileName The relative or fully qualified URI of the javascript file |
| 870 | 870 | * @param string $sType Determines the script type. Defaults to 'text/javascript' |
| 871 | 871 | * |
| 872 | - * @return \Jaxon\Plugin\Response |
|
| 872 | + * @return Response |
|
| 873 | 873 | */ |
| 874 | 874 | public function includeScript($sFileName, $sType = null, $sId = null) |
| 875 | 875 | { |
@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | * @param string $sFileName The relative or fully qualified URI of the javascript file |
| 891 | 891 | * @param string $sType Determines the script type. Defaults to 'text/javascript' |
| 892 | 892 | * |
| 893 | - * @return \Jaxon\Plugin\Response |
|
| 893 | + * @return Response |
|
| 894 | 894 | */ |
| 895 | 895 | public function includeScriptOnce($sFileName, $sType = null, $sId = null) |
| 896 | 896 | { |
@@ -913,7 +913,7 @@ discard block |
||
| 913 | 913 | * @param string $sFileName The relative or fully qualified URI of the javascript file |
| 914 | 914 | * @param string $sUnload Name of a javascript function to call prior to unlaoding the file |
| 915 | 915 | * |
| 916 | - * @return \Jaxon\Plugin\Response |
|
| 916 | + * @return Response |
|
| 917 | 917 | */ |
| 918 | 918 | public function removeScript($sFileName, $sUnload = '') |
| 919 | 919 | { |
@@ -934,7 +934,7 @@ discard block |
||
| 934 | 934 | * @param string $sFileName The relative or fully qualified URI of the css file |
| 935 | 935 | * @param string $sMedia The media type of the CSS file. Defaults to 'screen' |
| 936 | 936 | * |
| 937 | - * @return \Jaxon\Plugin\Response |
|
| 937 | + * @return Response |
|
| 938 | 938 | */ |
| 939 | 939 | public function includeCSS($sFileName, $sMedia = null) |
| 940 | 940 | { |
@@ -953,7 +953,7 @@ discard block |
||
| 953 | 953 | * |
| 954 | 954 | * @param string $sFileName The relative or fully qualified URI of the css file |
| 955 | 955 | * |
| 956 | - * @return \Jaxon\Plugin\Response |
|
| 956 | + * @return Response |
|
| 957 | 957 | */ |
| 958 | 958 | public function removeCSS($sFileName, $sMedia = null) |
| 959 | 959 | { |
@@ -978,7 +978,7 @@ discard block |
||
| 978 | 978 | * @param integer $iTimeout The number of 1/10ths of a second to pause before timing out |
| 979 | 979 | * and continuing with the execution of the response commands |
| 980 | 980 | * |
| 981 | - * @return \Jaxon\Plugin\Response |
|
| 981 | + * @return Response |
|
| 982 | 982 | */ |
| 983 | 983 | public function waitForCSS($iTimeout = 600) |
| 984 | 984 | { |
@@ -1003,7 +1003,7 @@ discard block |
||
| 1003 | 1003 | * @param integer $tenths The number of 1/10ths of a second to wait before timing out |
| 1004 | 1004 | * and continuing with the execution of the response commands. |
| 1005 | 1005 | * |
| 1006 | - * @return \Jaxon\Plugin\Response |
|
| 1006 | + * @return Response |
|
| 1007 | 1007 | */ |
| 1008 | 1008 | public function waitFor($script, $tenths) |
| 1009 | 1009 | { |
@@ -1024,7 +1024,7 @@ discard block |
||
| 1024 | 1024 | * |
| 1025 | 1025 | * @param integer $tenths The number of 1/10ths of a second to sleep |
| 1026 | 1026 | * |
| 1027 | - * @return \Jaxon\Plugin\Response |
|
| 1027 | + * @return Response |
|
| 1028 | 1028 | */ |
| 1029 | 1029 | public function sleep($tenths) |
| 1030 | 1030 | { |
@@ -1053,7 +1053,7 @@ discard block |
||
| 1053 | 1053 | * @param string $variable The DOM element name (id or class) |
| 1054 | 1054 | * @param string $tag The HTML tag of the new DOM element |
| 1055 | 1055 | * |
| 1056 | - * @return \Jaxon\Plugin\Response |
|
| 1056 | + * @return Response |
|
| 1057 | 1057 | */ |
| 1058 | 1058 | public function domCreateElement($variable, $tag) |
| 1059 | 1059 | { |
@@ -1073,7 +1073,7 @@ discard block |
||
| 1073 | 1073 | * @param string $key The name of the attribute |
| 1074 | 1074 | * @param string $value The value of the attribute |
| 1075 | 1075 | * |
| 1076 | - * @return \Jaxon\Plugin\Response |
|
| 1076 | + * @return Response |
|
| 1077 | 1077 | */ |
| 1078 | 1078 | public function domSetAttribute($variable, $key, $value) |
| 1079 | 1079 | { |
@@ -1094,7 +1094,7 @@ discard block |
||
| 1094 | 1094 | * @param string $skip The ?? |
| 1095 | 1095 | * @param string $remove The ?? |
| 1096 | 1096 | * |
| 1097 | - * @return \Jaxon\Plugin\Response |
|
| 1097 | + * @return Response |
|
| 1098 | 1098 | */ |
| 1099 | 1099 | public function domRemoveChildren($parent, $skip = null, $remove = null) |
| 1100 | 1100 | { |
@@ -1115,7 +1115,7 @@ discard block |
||
| 1115 | 1115 | * @param string $parent The DOM parent element |
| 1116 | 1116 | * @param string $variable The DOM element name (id or class) |
| 1117 | 1117 | * |
| 1118 | - * @return \Jaxon\Plugin\Response |
|
| 1118 | + * @return Response |
|
| 1119 | 1119 | */ |
| 1120 | 1120 | public function domAppendChild($parent, $variable) |
| 1121 | 1121 | { |
@@ -1134,7 +1134,7 @@ discard block |
||
| 1134 | 1134 | * @param string $target The DOM target element |
| 1135 | 1135 | * @param string $variable The DOM element name (id or class) |
| 1136 | 1136 | * |
| 1137 | - * @return \Jaxon\Plugin\Response |
|
| 1137 | + * @return Response |
|
| 1138 | 1138 | */ |
| 1139 | 1139 | public function domInsertBefore($target, $variable) |
| 1140 | 1140 | { |
@@ -1153,7 +1153,7 @@ discard block |
||
| 1153 | 1153 | * @param string $target The DOM target element |
| 1154 | 1154 | * @param string $variable The DOM element name (id or class) |
| 1155 | 1155 | * |
| 1156 | - * @return \Jaxon\Plugin\Response |
|
| 1156 | + * @return Response |
|
| 1157 | 1157 | */ |
| 1158 | 1158 | public function domInsertAfter($target, $variable) |
| 1159 | 1159 | { |
@@ -1172,7 +1172,7 @@ discard block |
||
| 1172 | 1172 | * @param string $parent The DOM parent element |
| 1173 | 1173 | * @param string $text The HTML text to append |
| 1174 | 1174 | * |
| 1175 | - * @return \Jaxon\Plugin\Response |
|
| 1175 | + * @return Response |
|
| 1176 | 1176 | */ |
| 1177 | 1177 | public function domAppendText($parent, $text) |
| 1178 | 1178 | { |
@@ -1213,7 +1213,7 @@ discard block |
||
| 1213 | 1213 | * |
| 1214 | 1214 | * @param mixed $value Any value |
| 1215 | 1215 | * |
| 1216 | - * @return \Jaxon\Plugin\Response |
|
| 1216 | + * @return Response |
|
| 1217 | 1217 | */ |
| 1218 | 1218 | public function setReturnValue($value) |
| 1219 | 1219 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | public function plugin($sName) |
| 76 | 76 | { |
| 77 | 77 | $xPlugin = $this->getPluginManager()->getResponsePlugin($sName); |
| 78 | - if(!$xPlugin) |
|
| 78 | + if (!$xPlugin) |
|
| 79 | 79 | { |
| 80 | 80 | return null; |
| 81 | 81 | } |
@@ -138,23 +138,23 @@ discard block |
||
| 138 | 138 | public function addCommand($aAttributes, $mData) |
| 139 | 139 | { |
| 140 | 140 | /* merge commands if possible */ |
| 141 | - if(in_array($aAttributes['cmd'], ['js', 'ap'])) |
|
| 141 | + if (in_array($aAttributes['cmd'], ['js', 'ap'])) |
|
| 142 | 142 | { |
| 143 | - if(($aLastCommand = array_pop($this->aCommands))) |
|
| 143 | + if (($aLastCommand = array_pop($this->aCommands))) |
|
| 144 | 144 | { |
| 145 | - if($aLastCommand['cmd'] == $aAttributes['cmd']) |
|
| 145 | + if ($aLastCommand['cmd'] == $aAttributes['cmd']) |
|
| 146 | 146 | { |
| 147 | - if($this->getOption('core.response.merge.js') && |
|
| 147 | + if ($this->getOption('core.response.merge.js') && |
|
| 148 | 148 | $aLastCommand['cmd'] == 'js') |
| 149 | 149 | { |
| 150 | - $mData = $aLastCommand['data'].'; '.$mData; |
|
| 150 | + $mData = $aLastCommand['data'] . '; ' . $mData; |
|
| 151 | 151 | } |
| 152 | - elseif($this->getOption('core.response.merge.ap') && |
|
| 152 | + elseif ($this->getOption('core.response.merge.ap') && |
|
| 153 | 153 | $aLastCommand['cmd'] == 'ap' && |
| 154 | 154 | $aLastCommand['id'] == $aAttributes['id'] && |
| 155 | 155 | $aLastCommand['prop'] == $aAttributes['prop']) |
| 156 | 156 | { |
| 157 | - $mData = $aLastCommand['data'].' '.$mData; |
|
| 157 | + $mData = $aLastCommand['data'] . ' ' . $mData; |
|
| 158 | 158 | } |
| 159 | 159 | else |
| 160 | 160 | { |
@@ -212,26 +212,26 @@ discard block |
||
| 212 | 212 | public function appendResponse(AbstractResponse $mCommands, $bBefore = false) |
| 213 | 213 | { |
| 214 | 214 | $aCommands = []; |
| 215 | - if($mCommands instanceof Response) |
|
| 215 | + if ($mCommands instanceof Response) |
|
| 216 | 216 | { |
| 217 | 217 | $this->returnValue = $mCommands->returnValue; |
| 218 | 218 | $aCommands = $mCommands->aCommands; |
| 219 | 219 | } |
| 220 | - elseif(is_array($mCommands)) |
|
| 220 | + elseif (is_array($mCommands)) |
|
| 221 | 221 | { |
| 222 | 222 | $aCommands = $mCommands; |
| 223 | 223 | } |
| 224 | 224 | else |
| 225 | 225 | { |
| 226 | - if(!empty($mCommands)) |
|
| 226 | + if (!empty($mCommands)) |
|
| 227 | 227 | { |
| 228 | 228 | throw new \Jaxon\Exception\Error($this->trans('errors.response.data.invalid')); |
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | - if(count($aCommands) > 0) |
|
| 232 | + if (count($aCommands) > 0) |
|
| 233 | 233 | { |
| 234 | - if($bBefore) |
|
| 234 | + if ($bBefore) |
|
| 235 | 235 | { |
| 236 | 236 | $this->aCommands = array_merge($aCommands, $this->aCommands); |
| 237 | 237 | } |
@@ -503,33 +503,33 @@ discard block |
||
| 503 | 503 | * |
| 504 | 504 | * @return \Jaxon\Plugin\Response |
| 505 | 505 | */ |
| 506 | - public function redirect($sURL, $iDelay=0) |
|
| 506 | + public function redirect($sURL, $iDelay = 0) |
|
| 507 | 507 | { |
| 508 | 508 | // we need to parse the query part so that the values are rawurlencode()'ed |
| 509 | 509 | // can't just use parse_url() cos we could be dealing with a relative URL which |
| 510 | 510 | // parse_url() can't deal with. |
| 511 | 511 | $queryStart = strpos($sURL, '?', strrpos($sURL, '/')); |
| 512 | - if($queryStart !== false) |
|
| 512 | + if ($queryStart !== false) |
|
| 513 | 513 | { |
| 514 | 514 | $queryStart++; |
| 515 | 515 | $queryEnd = strpos($sURL, '#', $queryStart); |
| 516 | - if($queryEnd === false) |
|
| 516 | + if ($queryEnd === false) |
|
| 517 | 517 | $queryEnd = strlen($sURL); |
| 518 | - $queryPart = substr($sURL, $queryStart, $queryEnd-$queryStart); |
|
| 518 | + $queryPart = substr($sURL, $queryStart, $queryEnd - $queryStart); |
|
| 519 | 519 | parse_str($queryPart, $queryParts); |
| 520 | 520 | $newQueryPart = ""; |
| 521 | - if($queryParts) |
|
| 521 | + if ($queryParts) |
|
| 522 | 522 | { |
| 523 | 523 | $first = true; |
| 524 | - foreach($queryParts as $key => $value) |
|
| 524 | + foreach ($queryParts as $key => $value) |
|
| 525 | 525 | { |
| 526 | - if($first) |
|
| 526 | + if ($first) |
|
| 527 | 527 | $first = false; |
| 528 | 528 | else |
| 529 | 529 | $newQueryPart .= '&'; |
| 530 | - $newQueryPart .= rawurlencode($key).'='.rawurlencode($value); |
|
| 530 | + $newQueryPart .= rawurlencode($key) . '=' . rawurlencode($value); |
|
| 531 | 531 | } |
| 532 | - } elseif($_SERVER['QUERY_STRING']) { |
|
| 532 | + } elseif ($_SERVER['QUERY_STRING']) { |
|
| 533 | 533 | //couldn't break up the query, but there's one there |
| 534 | 534 | //possibly "http://url/page.html?query1234" type of query? |
| 535 | 535 | //just encode it and hope it works |
@@ -537,8 +537,8 @@ discard block |
||
| 537 | 537 | } |
| 538 | 538 | $sURL = str_replace($queryPart, $newQueryPart, $sURL); |
| 539 | 539 | } |
| 540 | - if($iDelay) |
|
| 541 | - $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay*1000) . ');'); |
|
| 540 | + if ($iDelay) |
|
| 541 | + $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay * 1000) . ');'); |
|
| 542 | 542 | else |
| 543 | 543 | $this->script('window.location = "' . $sURL . '";'); |
| 544 | 544 | return $this; |
@@ -875,10 +875,10 @@ discard block |
||
| 875 | 875 | { |
| 876 | 876 | $command = ['cmd' => 'in']; |
| 877 | 877 | |
| 878 | - if(($sType)) |
|
| 878 | + if (($sType)) |
|
| 879 | 879 | $command['type'] = trim((string)$sType, " \t"); |
| 880 | 880 | |
| 881 | - if(($sId)) |
|
| 881 | + if (($sId)) |
|
| 882 | 882 | $command['elm_id'] = trim((string)$sId, " \t"); |
| 883 | 883 | |
| 884 | 884 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
@@ -896,10 +896,10 @@ discard block |
||
| 896 | 896 | { |
| 897 | 897 | $command = ['cmd' => 'ino']; |
| 898 | 898 | |
| 899 | - if(($sType)) |
|
| 899 | + if (($sType)) |
|
| 900 | 900 | $command['type'] = trim((string)$sType, " \t"); |
| 901 | 901 | |
| 902 | - if(($sId)) |
|
| 902 | + if (($sId)) |
|
| 903 | 903 | $command['elm_id'] = trim((string)$sId, " \t"); |
| 904 | 904 | |
| 905 | 905 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
@@ -940,7 +940,7 @@ discard block |
||
| 940 | 940 | { |
| 941 | 941 | $command = ['cmd' => 'css']; |
| 942 | 942 | |
| 943 | - if(($sMedia)) |
|
| 943 | + if (($sMedia)) |
|
| 944 | 944 | $command['media'] = trim((string)$sMedia, " \t"); |
| 945 | 945 | |
| 946 | 946 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
@@ -959,7 +959,7 @@ discard block |
||
| 959 | 959 | { |
| 960 | 960 | $command = ['cmd' => 'rcss']; |
| 961 | 961 | |
| 962 | - if(($sMedia)) |
|
| 962 | + if (($sMedia)) |
|
| 963 | 963 | $command['media'] = trim((string)$sMedia, " \t"); |
| 964 | 964 | |
| 965 | 965 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
@@ -1100,10 +1100,10 @@ discard block |
||
| 1100 | 1100 | { |
| 1101 | 1101 | $command = ['cmd' => 'DRC']; |
| 1102 | 1102 | |
| 1103 | - if(($skip)) |
|
| 1103 | + if (($skip)) |
|
| 1104 | 1104 | $command['skip'] = $skip; |
| 1105 | 1105 | |
| 1106 | - if(($remove)) |
|
| 1106 | + if (($remove)) |
|
| 1107 | 1107 | $command['remove'] = $remove; |
| 1108 | 1108 | |
| 1109 | 1109 | return $this->addCommand($command, $parent); |
@@ -1230,13 +1230,13 @@ discard block |
||
| 1230 | 1230 | { |
| 1231 | 1231 | $response = []; |
| 1232 | 1232 | |
| 1233 | - if(($this->returnValue)) |
|
| 1233 | + if (($this->returnValue)) |
|
| 1234 | 1234 | { |
| 1235 | 1235 | $response['jxnrv'] = $this->returnValue; |
| 1236 | 1236 | } |
| 1237 | 1237 | $response['jxnobj'] = []; |
| 1238 | 1238 | |
| 1239 | - foreach($this->aCommands as $xCommand) |
|
| 1239 | + foreach ($this->aCommands as $xCommand) |
|
| 1240 | 1240 | { |
| 1241 | 1241 | $response['jxnobj'][] = $xCommand; |
| 1242 | 1242 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function sendHeaders() |
| 33 | 33 | { |
| 34 | - if($this->getRequesthandler()->requestMethodIsGet()) |
|
| 34 | + if ($this->getRequesthandler()->requestMethodIsGet()) |
|
| 35 | 35 | { |
| 36 | 36 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
| 37 | 37 | header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $sCharacterSet = ''; |
| 43 | 43 | $sCharacterEncoding = $this->getCharacterEncoding(); |
| 44 | - if(is_string($sCharacterEncoding) && strlen($sCharacterEncoding) > 0) |
|
| 44 | + if (is_string($sCharacterEncoding) && strlen($sCharacterEncoding) > 0) |
|
| 45 | 45 | { |
| 46 | 46 | $sCharacterSet = '; charset="' . $sCharacterEncoding . '"'; |
| 47 | 47 | } |
@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function append(AbstractResponse $xResponse) |
| 86 | 86 | { |
| 87 | - if(!$this->xResponse) |
|
| 87 | + if (!$this->xResponse) |
|
| 88 | 88 | { |
| 89 | 89 | $this->xResponse = $xResponse; |
| 90 | 90 | } |
| 91 | - elseif(get_class($this->xResponse) == get_class($xResponse)) |
|
| 91 | + elseif (get_class($this->xResponse) == get_class($xResponse)) |
|
| 92 | 92 | { |
| 93 | - if($this->xResponse != $xResponse) |
|
| 93 | + if ($this->xResponse != $xResponse) |
|
| 94 | 94 | { |
| 95 | 95 | $this->xResponse->appendResponse($xResponse); |
| 96 | 96 | } |
@@ -137,9 +137,9 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function printDebug() |
| 139 | 139 | { |
| 140 | - if(($this->xResponse)) |
|
| 140 | + if (($this->xResponse)) |
|
| 141 | 141 | { |
| 142 | - foreach($this->aDebugMessages as $sMessage) |
|
| 142 | + foreach ($this->aDebugMessages as $sMessage) |
|
| 143 | 143 | { |
| 144 | 144 | $this->xResponse->debug($sMessage); |
| 145 | 145 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public function sendHeaders() |
| 156 | 156 | { |
| 157 | - if(($this->xResponse)) |
|
| 157 | + if (($this->xResponse)) |
|
| 158 | 158 | { |
| 159 | 159 | $this->xResponse->sendHeaders(); |
| 160 | 160 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | public function getOutput() |
| 169 | 169 | { |
| 170 | - if(($this->xResponse)) |
|
| 170 | + if (($this->xResponse)) |
|
| 171 | 171 | { |
| 172 | 172 | return $this->xResponse->getOutput(); |
| 173 | 173 | } |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | */ |
| 182 | 182 | public function sendOutput() |
| 183 | 183 | { |
| 184 | - if(($this->xResponse)) |
|
| 184 | + if (($this->xResponse)) |
|
| 185 | 185 | { |
| 186 | 186 | $this->xResponse->sendHeaders(); |
| 187 | 187 | $this->xResponse->printOutput(); |
@@ -72,11 +72,10 @@ |
||
| 72 | 72 | public function getOutput() |
| 73 | 73 | { |
| 74 | 74 | $aResponse = ($this->sUploadedFile) ? |
| 75 | - ['code' => 'success', 'upl' => $this->sUploadedFile] : |
|
| 76 | - ['code' => 'error', 'msg' => $this->sErrorMessage]; |
|
| 75 | + ['code' => 'success', 'upl' => $this->sUploadedFile] : ['code' => 'error', 'msg' => $this->sErrorMessage]; |
|
| 77 | 76 | |
| 78 | 77 | $sConsoleLog = ''; |
| 79 | - array_walk($this->aDebugMessages, function ($sMessage) use (&$sConsoleLog) { |
|
| 78 | + array_walk($this->aDebugMessages, function($sMessage) use (&$sConsoleLog) { |
|
| 80 | 79 | $sConsoleLog .= ' |
| 81 | 80 | console.log("' . addslashes($sMessage) . '");'; |
| 82 | 81 | }); |