@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | /** |
18 | 18 | * Get the Jaxon response. |
19 | 19 | * |
20 | - * @return Response |
|
20 | + * @return \Jaxon\Response\Response |
|
21 | 21 | */ |
22 | 22 | public function ajaxResponse() |
23 | 23 | { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Get a request to a registered class |
41 | 41 | * |
42 | - * @param string $sClass The class name |
|
42 | + * @param string $sClassName The class name |
|
43 | 43 | * |
44 | 44 | * @return \Jaxon\Request\Factory\CallableClass\Request |
45 | 45 | */ |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | /** |
109 | 109 | * Get the view renderer |
110 | 110 | * |
111 | - * @return Jaxon\Utils\View\Renderer |
|
111 | + * @return \Jaxon\Utils\View\Renderer |
|
112 | 112 | */ |
113 | 113 | public function view() |
114 | 114 | { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | /** |
119 | 119 | * Get the session manager |
120 | 120 | * |
121 | - * @return Jaxon\Contracts\Session |
|
121 | + * @return \Jaxon\Contracts\Session |
|
122 | 122 | */ |
123 | 123 | public function session() |
124 | 124 | { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | /** |
198 | 198 | * Clear all the commands already added to the response |
199 | 199 | * |
200 | - * @return \Jaxon\Plugin\Response |
|
200 | + * @return Response |
|
201 | 201 | */ |
202 | 202 | public function clearCommands() |
203 | 203 | { |
@@ -211,9 +211,9 @@ discard block |
||
211 | 211 | * |
212 | 212 | * @param \Jaxon\Plugin\Plugin $xPlugin The plugin object |
213 | 213 | * @param array $aAttributes The attributes for this response command |
214 | - * @param mixed $mData The data to be sent with this command |
|
214 | + * @param string $mData The data to be sent with this command |
|
215 | 215 | * |
216 | - * @return \Jaxon\Plugin\Response |
|
216 | + * @return ResponseContract |
|
217 | 217 | */ |
218 | 218 | public function addPluginCommand($xPlugin, $aAttributes, $mData) |
219 | 219 | { |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | * @param integer $iCmdNumber The number of commands to skip upon cancel |
273 | 273 | * @param string $sMessage The message to display to the user |
274 | 274 | * |
275 | - * @return \Jaxon\Plugin\Response |
|
275 | + * @return ResponseContract |
|
276 | 276 | */ |
277 | 277 | public function confirmCommands($iCmdNumber, $sMessage) |
278 | 278 | { |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | * @param string $sAttribute The attribute to be assigned |
293 | 293 | * @param string $sData The value to be assigned to the attribute |
294 | 294 | * |
295 | - * @return \Jaxon\Plugin\Response |
|
295 | + * @return ResponseContract |
|
296 | 296 | */ |
297 | 297 | public function assign($sTarget, $sAttribute, $sData) |
298 | 298 | { |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * @param string $sTarget The id of the html element on the browser |
315 | 315 | * @param string $sData The value to be assigned to the attribute |
316 | 316 | * |
317 | - * @return \Jaxon\Plugin\Response |
|
317 | + * @return ResponseContract |
|
318 | 318 | */ |
319 | 319 | public function html($sTarget, $sData) |
320 | 320 | { |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | * @param string $sAttribute The name of the attribute to be appended to |
329 | 329 | * @param string $sData The data to be appended to the attribute |
330 | 330 | * |
331 | - * @return \Jaxon\Plugin\Response |
|
331 | + * @return ResponseContract |
|
332 | 332 | */ |
333 | 333 | public function append($sTarget, $sAttribute, $sData) |
334 | 334 | { |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | * @param string $sAttribute The name of the attribute to be prepended to |
350 | 350 | * @param string $sData The value to be prepended to the attribute |
351 | 351 | * |
352 | - * @return \Jaxon\Plugin\Response |
|
352 | + * @return ResponseContract |
|
353 | 353 | */ |
354 | 354 | public function prepend($sTarget, $sAttribute, $sData) |
355 | 355 | { |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | * @param string $sSearch The needle to search for |
372 | 372 | * @param string $sData The data to use in place of the needle |
373 | 373 | * |
374 | - * @return \Jaxon\Plugin\Response |
|
374 | + * @return ResponseContract |
|
375 | 375 | */ |
376 | 376 | public function replace($sTarget, $sAttribute, $sSearch, $sData) |
377 | 377 | { |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | * @param string $sTarget The id of the element to be updated. |
395 | 395 | * @param string $sAttribute The attribute to be cleared |
396 | 396 | * |
397 | - * @return \Jaxon\Plugin\Response |
|
397 | + * @return ResponseContract |
|
398 | 398 | */ |
399 | 399 | public function clear($sTarget, $sAttribute) |
400 | 400 | { |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | * @param string $sAttribute The attribute to be updated |
411 | 411 | * @param string $sData The value to assign |
412 | 412 | * |
413 | - * @return \Jaxon\Plugin\Response |
|
413 | + * @return ResponseContract |
|
414 | 414 | */ |
415 | 415 | public function contextAssign($sAttribute, $sData) |
416 | 416 | { |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * @param string $sAttribute The attribute to be appended to |
433 | 433 | * @param string $sData The value to append |
434 | 434 | * |
435 | - * @return \Jaxon\Plugin\Response |
|
435 | + * @return ResponseContract |
|
436 | 436 | */ |
437 | 437 | public function contextAppend($sAttribute, $sData) |
438 | 438 | { |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | * @param string $sAttribute The attribute to be updated |
455 | 455 | * @param string $sData The value to be prepended |
456 | 456 | * |
457 | - * @return \Jaxon\Plugin\Response |
|
457 | + * @return ResponseContract |
|
458 | 458 | */ |
459 | 459 | public function contextPrepend($sAttribute, $sData) |
460 | 460 | { |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | * |
476 | 476 | * @param string $sAttribute The attribute to be cleared |
477 | 477 | * |
478 | - * @return \Jaxon\Plugin\Response |
|
478 | + * @return ResponseContract |
|
479 | 479 | */ |
480 | 480 | public function contextClear($sAttribute) |
481 | 481 | { |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | * |
488 | 488 | * @param string $sMessage The message to be displayed |
489 | 489 | * |
490 | - * @return \Jaxon\Plugin\Response |
|
490 | + * @return ResponseContract |
|
491 | 491 | */ |
492 | 492 | public function alert($sMessage) |
493 | 493 | { |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | * |
505 | 505 | * @param string $sMessage The message to be displayed |
506 | 506 | * |
507 | - * @return \Jaxon\Plugin\Response |
|
507 | + * @return ResponseContract |
|
508 | 508 | */ |
509 | 509 | public function debug($sMessage) |
510 | 510 | { |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | * @param string $sURL The relative or fully qualified URL |
523 | 523 | * @param integer $iDelay Number of seconds to delay before the redirect occurs |
524 | 524 | * |
525 | - * @return \Jaxon\Plugin\Response |
|
525 | + * @return Response |
|
526 | 526 | */ |
527 | 527 | public function redirect($sURL, $iDelay=0) |
528 | 528 | { |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | * |
576 | 576 | * @param string $sJS The script to execute |
577 | 577 | * |
578 | - * @return \Jaxon\Plugin\Response |
|
578 | + * @return ResponseContract |
|
579 | 579 | */ |
580 | 580 | public function script($sJS) |
581 | 581 | { |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | * |
593 | 593 | * @param string $sFunc The name of the function to call |
594 | 594 | * |
595 | - * @return \Jaxon\Plugin\Response |
|
595 | + * @return ResponseContract |
|
596 | 596 | */ |
597 | 597 | public function call($sFunc) |
598 | 598 | { |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | * |
613 | 613 | * @param string $sTarget The id of the element to be removed |
614 | 614 | * |
615 | - * @return \Jaxon\Plugin\Response |
|
615 | + * @return ResponseContract |
|
616 | 616 | */ |
617 | 617 | public function remove($sTarget) |
618 | 618 | { |
@@ -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 ResponseContract |
|
636 | 636 | */ |
637 | 637 | public function create($sParent, $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 ResponseContract |
|
657 | 657 | */ |
658 | 658 | public function insert($sBefore, $sTag, $sId) |
659 | 659 | { |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | * @param string $sTag The tag name to be used for the new element |
675 | 675 | * @param string $sId The id to assign to the new element |
676 | 676 | * |
677 | - * @return \Jaxon\Plugin\Response |
|
677 | + * @return ResponseContract |
|
678 | 678 | */ |
679 | 679 | public function insertAfter($sAfter, $sTag, $sId) |
680 | 680 | { |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | * @param string $sName The name of the new input element |
697 | 697 | * @param string $sId The id of the new element |
698 | 698 | * |
699 | - * @return \Jaxon\Plugin\Response |
|
699 | + * @return ResponseContract |
|
700 | 700 | */ |
701 | 701 | public function createInput($sParent, $sType, $sName, $sId) |
702 | 702 | { |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | * @param string $sName The name of the new input element |
720 | 720 | * @param string $sId The id of the new element |
721 | 721 | * |
722 | - * @return \Jaxon\Plugin\Response |
|
722 | + * @return ResponseContract |
|
723 | 723 | */ |
724 | 724 | public function insertInput($sBefore, $sType, $sName, $sId) |
725 | 725 | { |
@@ -742,7 +742,7 @@ discard block |
||
742 | 742 | * @param string $sName The name of the new input element |
743 | 743 | * @param string $sId The id of the new element |
744 | 744 | * |
745 | - * @return \Jaxon\Plugin\Response |
|
745 | + * @return ResponseContract |
|
746 | 746 | */ |
747 | 747 | public function insertInputAfter($sAfter, $sType, $sName, $sId) |
748 | 748 | { |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | * @param string $sEvent The name of the event |
765 | 765 | * @param string $sScript The javascript to execute when the event is fired |
766 | 766 | * |
767 | - * @return \Jaxon\Plugin\Response |
|
767 | + * @return ResponseContract |
|
768 | 768 | */ |
769 | 769 | public function setEvent($sTarget, $sEvent, $sScript) |
770 | 770 | { |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | * @param string $sTarget The id of the element that contains the event |
785 | 785 | * @param string $sScript The javascript to execute when the event is fired |
786 | 786 | * |
787 | - * @return \Jaxon\Plugin\Response |
|
787 | + * @return ResponseContract |
|
788 | 788 | */ |
789 | 789 | public function onClick($sTarget, $sScript) |
790 | 790 | { |
@@ -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 to call when the event is fired |
802 | 802 | * |
803 | - * @return \Jaxon\Plugin\Response |
|
803 | + * @return ResponseContract |
|
804 | 804 | */ |
805 | 805 | public function addHandler($sTarget, $sEvent, $sHandler) |
806 | 806 | { |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | * @param string $sEvent The name of the event |
822 | 822 | * @param string $sHandler The name of the javascript function called when the event is fired |
823 | 823 | * |
824 | - * @return \Jaxon\Plugin\Response |
|
824 | + * @return ResponseContract |
|
825 | 825 | */ |
826 | 826 | public function removeHandler($sTarget, $sEvent, $sHandler) |
827 | 827 | { |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | * @param string $sArgs Comma separated list of parameter names |
843 | 843 | * @param string $sScript The javascript code that will become the body of the function |
844 | 844 | * |
845 | - * @return \Jaxon\Plugin\Response |
|
845 | + * @return ResponseContract |
|
846 | 846 | */ |
847 | 847 | public function setFunction($sFunction, $sArgs, $sScript) |
848 | 848 | { |
@@ -869,7 +869,7 @@ discard block |
||
869 | 869 | * @param string $sReturnValueVar The name of the variable that will retain the return value |
870 | 870 | * from the call to the original function |
871 | 871 | * |
872 | - * @return \Jaxon\Plugin\Response |
|
872 | + * @return ResponseContract |
|
873 | 873 | */ |
874 | 874 | public function wrapFunction($sFunction, $sArgs, $aScripts, $sReturnValueVar) |
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 ResponseContract |
|
894 | 894 | */ |
895 | 895 | public function includeScript($sFileName, $sType = null, $sId = null) |
896 | 896 | { |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | * @param string $sFileName The relative or fully qualified URI of the javascript file |
912 | 912 | * @param string $sType Determines the script type. Defaults to 'text/javascript' |
913 | 913 | * |
914 | - * @return \Jaxon\Plugin\Response |
|
914 | + * @return ResponseContract |
|
915 | 915 | */ |
916 | 916 | public function includeScriptOnce($sFileName, $sType = null, $sId = null) |
917 | 917 | { |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | * @param string $sFileName The relative or fully qualified URI of the javascript file |
935 | 935 | * @param string $sUnload Name of a javascript function to call prior to unlaoding the file |
936 | 936 | * |
937 | - * @return \Jaxon\Plugin\Response |
|
937 | + * @return ResponseContract |
|
938 | 938 | */ |
939 | 939 | public function removeScript($sFileName, $sUnload = '') |
940 | 940 | { |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | * @param string $sFileName The relative or fully qualified URI of the css file |
956 | 956 | * @param string $sMedia The media type of the CSS file. Defaults to 'screen' |
957 | 957 | * |
958 | - * @return \Jaxon\Plugin\Response |
|
958 | + * @return ResponseContract |
|
959 | 959 | */ |
960 | 960 | public function includeCSS($sFileName, $sMedia = null) |
961 | 961 | { |
@@ -974,7 +974,7 @@ discard block |
||
974 | 974 | * |
975 | 975 | * @param string $sFileName The relative or fully qualified URI of the css file |
976 | 976 | * |
977 | - * @return \Jaxon\Plugin\Response |
|
977 | + * @return ResponseContract |
|
978 | 978 | */ |
979 | 979 | public function removeCSS($sFileName, $sMedia = null) |
980 | 980 | { |
@@ -999,7 +999,7 @@ discard block |
||
999 | 999 | * @param integer $iTimeout The number of 1/10ths of a second to pause before timing out |
1000 | 1000 | * and continuing with the execution of the response commands |
1001 | 1001 | * |
1002 | - * @return \Jaxon\Plugin\Response |
|
1002 | + * @return ResponseContract |
|
1003 | 1003 | */ |
1004 | 1004 | public function waitForCSS($iTimeout = 600) |
1005 | 1005 | { |
@@ -1024,7 +1024,7 @@ discard block |
||
1024 | 1024 | * @param integer $tenths The number of 1/10ths of a second to wait before timing out |
1025 | 1025 | * and continuing with the execution of the response commands. |
1026 | 1026 | * |
1027 | - * @return \Jaxon\Plugin\Response |
|
1027 | + * @return ResponseContract |
|
1028 | 1028 | */ |
1029 | 1029 | public function waitFor($script, $tenths) |
1030 | 1030 | { |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | * |
1046 | 1046 | * @param integer $tenths The number of 1/10ths of a second to sleep |
1047 | 1047 | * |
1048 | - * @return \Jaxon\Plugin\Response |
|
1048 | + * @return ResponseContract |
|
1049 | 1049 | */ |
1050 | 1050 | public function sleep($tenths) |
1051 | 1051 | { |
@@ -1074,7 +1074,7 @@ discard block |
||
1074 | 1074 | * @param string $variable The DOM element name (id or class) |
1075 | 1075 | * @param string $tag The HTML tag of the new DOM element |
1076 | 1076 | * |
1077 | - * @return \Jaxon\Plugin\Response |
|
1077 | + * @return ResponseContract |
|
1078 | 1078 | */ |
1079 | 1079 | public function domCreateElement($variable, $tag) |
1080 | 1080 | { |
@@ -1094,7 +1094,7 @@ discard block |
||
1094 | 1094 | * @param string $key The name of the attribute |
1095 | 1095 | * @param string $value The value of the attribute |
1096 | 1096 | * |
1097 | - * @return \Jaxon\Plugin\Response |
|
1097 | + * @return ResponseContract |
|
1098 | 1098 | */ |
1099 | 1099 | public function domSetAttribute($variable, $key, $value) |
1100 | 1100 | { |
@@ -1115,7 +1115,7 @@ discard block |
||
1115 | 1115 | * @param string $skip The ?? |
1116 | 1116 | * @param string $remove The ?? |
1117 | 1117 | * |
1118 | - * @return \Jaxon\Plugin\Response |
|
1118 | + * @return ResponseContract |
|
1119 | 1119 | */ |
1120 | 1120 | public function domRemoveChildren($parent, $skip = null, $remove = null) |
1121 | 1121 | { |
@@ -1136,7 +1136,7 @@ discard block |
||
1136 | 1136 | * @param string $parent The DOM parent element |
1137 | 1137 | * @param string $variable The DOM element name (id or class) |
1138 | 1138 | * |
1139 | - * @return \Jaxon\Plugin\Response |
|
1139 | + * @return ResponseContract |
|
1140 | 1140 | */ |
1141 | 1141 | public function domAppendChild($parent, $variable) |
1142 | 1142 | { |
@@ -1155,7 +1155,7 @@ discard block |
||
1155 | 1155 | * @param string $target The DOM target element |
1156 | 1156 | * @param string $variable The DOM element name (id or class) |
1157 | 1157 | * |
1158 | - * @return \Jaxon\Plugin\Response |
|
1158 | + * @return ResponseContract |
|
1159 | 1159 | */ |
1160 | 1160 | public function domInsertBefore($target, $variable) |
1161 | 1161 | { |
@@ -1174,7 +1174,7 @@ discard block |
||
1174 | 1174 | * @param string $target The DOM target element |
1175 | 1175 | * @param string $variable The DOM element name (id or class) |
1176 | 1176 | * |
1177 | - * @return \Jaxon\Plugin\Response |
|
1177 | + * @return ResponseContract |
|
1178 | 1178 | */ |
1179 | 1179 | public function domInsertAfter($target, $variable) |
1180 | 1180 | { |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | * @param string $parent The DOM parent element |
1194 | 1194 | * @param string $text The HTML text to append |
1195 | 1195 | * |
1196 | - * @return \Jaxon\Plugin\Response |
|
1196 | + * @return ResponseContract |
|
1197 | 1197 | */ |
1198 | 1198 | public function domAppendText($parent, $text) |
1199 | 1199 | { |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | * |
1235 | 1235 | * @param mixed $value Any value |
1236 | 1236 | * |
1237 | - * @return \Jaxon\Plugin\Response |
|
1237 | + * @return Response |
|
1238 | 1238 | */ |
1239 | 1239 | public function setReturnValue($value) |
1240 | 1240 | { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | public function plugin($sName) |
97 | 97 | { |
98 | 98 | $xPlugin = $this->getPluginManager()->getResponsePlugin($sName); |
99 | - if(!$xPlugin) |
|
99 | + if (!$xPlugin) |
|
100 | 100 | { |
101 | 101 | return null; |
102 | 102 | } |
@@ -159,23 +159,23 @@ discard block |
||
159 | 159 | public function addCommand($aAttributes, $mData) |
160 | 160 | { |
161 | 161 | /* merge commands if possible */ |
162 | - if(in_array($aAttributes['cmd'], ['js', 'ap'])) |
|
162 | + if (in_array($aAttributes['cmd'], ['js', 'ap'])) |
|
163 | 163 | { |
164 | - if(($aLastCommand = array_pop($this->aCommands))) |
|
164 | + if (($aLastCommand = array_pop($this->aCommands))) |
|
165 | 165 | { |
166 | - if($aLastCommand['cmd'] == $aAttributes['cmd']) |
|
166 | + if ($aLastCommand['cmd'] == $aAttributes['cmd']) |
|
167 | 167 | { |
168 | - if($this->getOption('core.response.merge.js') && |
|
168 | + if ($this->getOption('core.response.merge.js') && |
|
169 | 169 | $aLastCommand['cmd'] == 'js') |
170 | 170 | { |
171 | - $mData = $aLastCommand['data'].'; '.$mData; |
|
171 | + $mData = $aLastCommand['data'] . '; ' . $mData; |
|
172 | 172 | } |
173 | - elseif($this->getOption('core.response.merge.ap') && |
|
173 | + elseif ($this->getOption('core.response.merge.ap') && |
|
174 | 174 | $aLastCommand['cmd'] == 'ap' && |
175 | 175 | $aLastCommand['id'] == $aAttributes['id'] && |
176 | 176 | $aLastCommand['prop'] == $aAttributes['prop']) |
177 | 177 | { |
178 | - $mData = $aLastCommand['data'].' '.$mData; |
|
178 | + $mData = $aLastCommand['data'] . ' ' . $mData; |
|
179 | 179 | } |
180 | 180 | else |
181 | 181 | { |
@@ -233,26 +233,26 @@ discard block |
||
233 | 233 | public function appendResponse(ResponseContract $mCommands, $bBefore = false) |
234 | 234 | { |
235 | 235 | $aCommands = []; |
236 | - if($mCommands instanceof Response) |
|
236 | + if ($mCommands instanceof Response) |
|
237 | 237 | { |
238 | 238 | $this->returnValue = $mCommands->returnValue; |
239 | 239 | $aCommands = $mCommands->aCommands; |
240 | 240 | } |
241 | - elseif(is_array($mCommands)) |
|
241 | + elseif (is_array($mCommands)) |
|
242 | 242 | { |
243 | 243 | $aCommands = $mCommands; |
244 | 244 | } |
245 | 245 | else |
246 | 246 | { |
247 | - if(!empty($mCommands)) |
|
247 | + if (!empty($mCommands)) |
|
248 | 248 | { |
249 | 249 | throw new \Jaxon\Exception\Error($this->trans('errors.response.data.invalid')); |
250 | 250 | } |
251 | 251 | } |
252 | 252 | |
253 | - if(count($aCommands) > 0) |
|
253 | + if (count($aCommands) > 0) |
|
254 | 254 | { |
255 | - if($bBefore) |
|
255 | + if ($bBefore) |
|
256 | 256 | { |
257 | 257 | $this->aCommands = array_merge($aCommands, $this->aCommands); |
258 | 258 | } |
@@ -524,33 +524,33 @@ discard block |
||
524 | 524 | * |
525 | 525 | * @return \Jaxon\Plugin\Response |
526 | 526 | */ |
527 | - public function redirect($sURL, $iDelay=0) |
|
527 | + public function redirect($sURL, $iDelay = 0) |
|
528 | 528 | { |
529 | 529 | // we need to parse the query part so that the values are rawurlencode()'ed |
530 | 530 | // can't just use parse_url() cos we could be dealing with a relative URL which |
531 | 531 | // parse_url() can't deal with. |
532 | 532 | $queryStart = strpos($sURL, '?', strrpos($sURL, '/')); |
533 | - if($queryStart !== false) |
|
533 | + if ($queryStart !== false) |
|
534 | 534 | { |
535 | 535 | $queryStart++; |
536 | 536 | $queryEnd = strpos($sURL, '#', $queryStart); |
537 | - if($queryEnd === false) |
|
537 | + if ($queryEnd === false) |
|
538 | 538 | $queryEnd = strlen($sURL); |
539 | - $queryPart = substr($sURL, $queryStart, $queryEnd-$queryStart); |
|
539 | + $queryPart = substr($sURL, $queryStart, $queryEnd - $queryStart); |
|
540 | 540 | parse_str($queryPart, $queryParts); |
541 | 541 | $newQueryPart = ""; |
542 | - if($queryParts) |
|
542 | + if ($queryParts) |
|
543 | 543 | { |
544 | 544 | $first = true; |
545 | - foreach($queryParts as $key => $value) |
|
545 | + foreach ($queryParts as $key => $value) |
|
546 | 546 | { |
547 | - if($first) |
|
547 | + if ($first) |
|
548 | 548 | $first = false; |
549 | 549 | else |
550 | 550 | $newQueryPart .= '&'; |
551 | - $newQueryPart .= rawurlencode($key).'='.rawurlencode($value); |
|
551 | + $newQueryPart .= rawurlencode($key) . '=' . rawurlencode($value); |
|
552 | 552 | } |
553 | - } elseif($_SERVER['QUERY_STRING']) { |
|
553 | + } elseif ($_SERVER['QUERY_STRING']) { |
|
554 | 554 | //couldn't break up the query, but there's one there |
555 | 555 | //possibly "http://url/page.html?query1234" type of query? |
556 | 556 | //just encode it and hope it works |
@@ -558,8 +558,8 @@ discard block |
||
558 | 558 | } |
559 | 559 | $sURL = str_replace($queryPart, $newQueryPart, $sURL); |
560 | 560 | } |
561 | - if($iDelay) |
|
562 | - $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay*1000) . ');'); |
|
561 | + if ($iDelay) |
|
562 | + $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay * 1000) . ');'); |
|
563 | 563 | else |
564 | 564 | $this->script('window.location = "' . $sURL . '";'); |
565 | 565 | return $this; |
@@ -896,10 +896,10 @@ discard block |
||
896 | 896 | { |
897 | 897 | $command = ['cmd' => 'in']; |
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")); |
@@ -917,10 +917,10 @@ discard block |
||
917 | 917 | { |
918 | 918 | $command = ['cmd' => 'ino']; |
919 | 919 | |
920 | - if(($sType)) |
|
920 | + if (($sType)) |
|
921 | 921 | $command['type'] = trim((string)$sType, " \t"); |
922 | 922 | |
923 | - if(($sId)) |
|
923 | + if (($sId)) |
|
924 | 924 | $command['elm_id'] = trim((string)$sId, " \t"); |
925 | 925 | |
926 | 926 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
@@ -961,7 +961,7 @@ discard block |
||
961 | 961 | { |
962 | 962 | $command = ['cmd' => 'css']; |
963 | 963 | |
964 | - if(($sMedia)) |
|
964 | + if (($sMedia)) |
|
965 | 965 | $command['media'] = trim((string)$sMedia, " \t"); |
966 | 966 | |
967 | 967 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | { |
981 | 981 | $command = ['cmd' => 'rcss']; |
982 | 982 | |
983 | - if(($sMedia)) |
|
983 | + if (($sMedia)) |
|
984 | 984 | $command['media'] = trim((string)$sMedia, " \t"); |
985 | 985 | |
986 | 986 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
@@ -1121,10 +1121,10 @@ discard block |
||
1121 | 1121 | { |
1122 | 1122 | $command = ['cmd' => 'DRC']; |
1123 | 1123 | |
1124 | - if(($skip)) |
|
1124 | + if (($skip)) |
|
1125 | 1125 | $command['skip'] = $skip; |
1126 | 1126 | |
1127 | - if(($remove)) |
|
1127 | + if (($remove)) |
|
1128 | 1128 | $command['remove'] = $remove; |
1129 | 1129 | |
1130 | 1130 | return $this->addCommand($command, $parent); |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | */ |
1250 | 1250 | public function sendHeaders() |
1251 | 1251 | { |
1252 | - if($this->getRequesthandler()->requestMethodIsGet()) |
|
1252 | + if ($this->getRequesthandler()->requestMethodIsGet()) |
|
1253 | 1253 | { |
1254 | 1254 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
1255 | 1255 | header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
@@ -1259,7 +1259,7 @@ discard block |
||
1259 | 1259 | |
1260 | 1260 | $sCharacterSet = ''; |
1261 | 1261 | $sCharacterEncoding = trim($this->getOption('core.encoding')); |
1262 | - if(($sCharacterEncoding) && strlen($sCharacterEncoding) > 0) |
|
1262 | + if (($sCharacterEncoding) && strlen($sCharacterEncoding) > 0) |
|
1263 | 1263 | { |
1264 | 1264 | $sCharacterSet = '; charset="' . trim($sCharacterEncoding) . '"'; |
1265 | 1265 | } |
@@ -1276,13 +1276,13 @@ discard block |
||
1276 | 1276 | { |
1277 | 1277 | $response = []; |
1278 | 1278 | |
1279 | - if(($this->returnValue)) |
|
1279 | + if (($this->returnValue)) |
|
1280 | 1280 | { |
1281 | 1281 | $response['jxnrv'] = $this->returnValue; |
1282 | 1282 | } |
1283 | 1283 | $response['jxnobj'] = []; |
1284 | 1284 | |
1285 | - foreach($this->aCommands as $xCommand) |
|
1285 | + foreach ($this->aCommands as $xCommand) |
|
1286 | 1286 | { |
1287 | 1287 | $response['jxnobj'][] = $xCommand; |
1288 | 1288 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function addNamespace($sNamespace, $sDirectory, $sExtension = '') |
56 | 56 | { |
57 | 57 | // The 'jaxon' key cannot be overriden |
58 | - if($sNamespace == 'jaxon') |
|
58 | + if ($sNamespace == 'jaxon') |
|
59 | 59 | { |
60 | 60 | return; |
61 | 61 | } |
@@ -92,18 +92,18 @@ discard block |
||
92 | 92 | // Get the namespace name |
93 | 93 | $sNamespace = ''; |
94 | 94 | $iSeparatorPosition = strrpos($sTemplate, '::'); |
95 | - if($iSeparatorPosition !== false) |
|
95 | + if ($iSeparatorPosition !== false) |
|
96 | 96 | { |
97 | 97 | $sNamespace = substr($sTemplate, 0, $iSeparatorPosition); |
98 | 98 | $sTemplate = substr($sTemplate, $iSeparatorPosition + 2); |
99 | 99 | } |
100 | 100 | // The default namespace is 'jaxon' |
101 | - if(!($sNamespace = trim($sNamespace))) |
|
101 | + if (!($sNamespace = trim($sNamespace))) |
|
102 | 102 | { |
103 | 103 | $sNamespace = 'jaxon'; |
104 | 104 | } |
105 | 105 | // Check if the namespace is defined |
106 | - if(!key_exists($sNamespace, $this->aNamespaces)) |
|
106 | + if (!key_exists($sNamespace, $this->aNamespaces)) |
|
107 | 107 | { |
108 | 108 | return ''; |
109 | 109 | } |