Completed
Branch master (7a619a)
by Thierry
04:57 queued 02:21
created
src/Response/Response.php 2 patches
Doc Comments   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      * @param array         $aAttributes        Associative array of attributes that will describe the command
160 160
      * @param mixed            $mData                The data to be associated with this command
161 161
      *
162
-     * @return \Jaxon\Plugin\Response
162
+     * @return Response
163 163
      */
164 164
     public function addCommand($aAttributes, $mData)
165 165
     {
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     /**
201 201
      * Clear all the commands already added to the response
202 202
      *
203
-     * @return \Jaxon\Plugin\Response
203
+     * @return Response
204 204
      */
205 205
     public function clearCommands()
206 206
     {
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
      *
215 215
      * @param \Jaxon\Plugin\Plugin  $xPlugin            The plugin object
216 216
      * @param array                 $aAttributes        The attributes for this response command
217
-     * @param mixed                 $mData              The data to be sent with this command
217
+     * @param string                 $mData              The data to be sent with this command
218 218
      *
219
-     * @return \Jaxon\Plugin\Response
219
+     * @return Response
220 220
      */
221 221
     public function addPluginCommand($xPlugin, $aAttributes, $mData)
222 222
     {
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
      * @param integer        $iCmdNumber            The number of commands to skip upon cancel
278 278
      * @param string        $sMessage            The message to display to the user
279 279
      *
280
-     * @return \Jaxon\Plugin\Response
280
+     * @return Response
281 281
      */
282 282
     public function confirmCommands($iCmdNumber, $sMessage)
283 283
     {
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
      * @param string        $sAttribute           The attribute to be assigned
298 298
      * @param string        $sData                The value to be assigned to the attribute
299 299
      *
300
-     * @return \Jaxon\Plugin\Response
300
+     * @return Response
301 301
      */
302 302
     public function assign($sTarget, $sAttribute, $sData)
303 303
     {
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      * @param string        $sTarget              The id of the html element on the browser
320 320
      * @param string        $sData                The value to be assigned to the attribute
321 321
      *
322
-     * @return \Jaxon\Plugin\Response
322
+     * @return Response
323 323
      */
324 324
     public function html($sTarget, $sData)
325 325
     {
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      * @param string        $sAttribute            The name of the attribute to be appended to
334 334
      * @param string        $sData                The data to be appended to the attribute
335 335
      *
336
-     * @return \Jaxon\Plugin\Response
336
+     * @return Response
337 337
      */
338 338
     public function append($sTarget, $sAttribute, $sData)
339 339
     {    
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
      * @param string        $sAttribute            The name of the attribute to be prepended to
355 355
      * @param string        $sData                The value to be prepended to the attribute
356 356
      *
357
-     * @return \Jaxon\Plugin\Response
357
+     * @return Response
358 358
      */
359 359
     public function prepend($sTarget, $sAttribute, $sData)
360 360
     {
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
      * @param string        $sSearch            The needle to search for
377 377
      * @param string        $sData                The data to use in place of the needle
378 378
      *
379
-     * @return \Jaxon\Plugin\Response
379
+     * @return Response
380 380
      */
381 381
     public function replace($sTarget, $sAttribute, $sSearch, $sData)
382 382
     {
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
      * @param string        $sTarget            The id of the element to be updated.
400 400
      * @param string        $sAttribute            The attribute to be cleared
401 401
      *
402
-     * @return \Jaxon\Plugin\Response
402
+     * @return Response
403 403
      */
404 404
     public function clear($sTarget, $sAttribute)
405 405
     {
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      * @param string        $sAttribute            The attribute to be updated
416 416
      * @param string        $sData                The value to assign
417 417
      *
418
-     * @return \Jaxon\Plugin\Response
418
+     * @return Response
419 419
      */
420 420
     public function contextAssign($sAttribute, $sData)
421 421
     {
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
      * @param string        $sAttribute            The attribute to be appended to
438 438
      * @param string        $sData                The value to append
439 439
      *
440
-     * @return \Jaxon\Plugin\Response
440
+     * @return Response
441 441
      */
442 442
     public function contextAppend($sAttribute, $sData)
443 443
     {
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
      * @param string        $sAttribute            The attribute to be updated
460 460
      * @param string        $sData                The value to be prepended
461 461
      *
462
-     * @return \Jaxon\Plugin\Response
462
+     * @return Response
463 463
      */
464 464
     public function contextPrepend($sAttribute, $sData)
465 465
     {
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
      *
481 481
      * @param string        $sAttribute            The attribute to be cleared
482 482
      *
483
-     * @return \Jaxon\Plugin\Response
483
+     * @return Response
484 484
      */
485 485
     public function contextClear($sAttribute)
486 486
     {
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
      *
493 493
      * @param string        $sMessage            The message to be displayed
494 494
      *
495
-     * @return \Jaxon\Plugin\Response
495
+     * @return Response
496 496
      */
497 497
     public function alert($sMessage)
498 498
     {
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
      *
510 510
      * @param string        $sMessage            The message to be displayed
511 511
      *
512
-     * @return \Jaxon\Plugin\Response
512
+     * @return Response
513 513
      */
514 514
     public function debug($sMessage)
515 515
     {
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
      * @param string        $sURL                The relative or fully qualified URL
528 528
      * @param integer        $iDelay                Number of seconds to delay before the redirect occurs
529 529
      *
530
-     * @return \Jaxon\Plugin\Response
530
+     * @return Response
531 531
      */
532 532
     public function redirect($sURL, $iDelay=0)
533 533
     {
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
      *
581 581
      * @param string        $sJS                The script to execute
582 582
      *
583
-     * @return \Jaxon\Plugin\Response
583
+     * @return Response
584 584
      */
585 585
     public function script($sJS)
586 586
     {
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
      *
598 598
      * @param string        $sFunc                The name of the function to call
599 599
      *
600
-     * @return \Jaxon\Plugin\Response
600
+     * @return Response
601 601
      */
602 602
     public function call($sFunc)
603 603
     {
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
      *
618 618
      * @param string        $sTarget            The id of the element to be removed
619 619
      *
620
-     * @return \Jaxon\Plugin\Response
620
+     * @return Response
621 621
      */
622 622
     public function remove($sTarget)
623 623
     {
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
      * @param string        $sTag                The tag name to be used for the new element
638 638
      * @param string        $sId                The id to assign to the new element
639 639
      *
640
-     * @return \Jaxon\Plugin\Response
640
+     * @return Response
641 641
      */
642 642
     public function create($sParent, $sTag, $sId)
643 643
     {
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
      * @param string        $sTag               The tag name to be used for the new element
659 659
      * @param string        $sId                The id to assign to the new element
660 660
      *
661
-     * @return \Jaxon\Plugin\Response
661
+     * @return Response
662 662
      */
663 663
     public function insert($sBefore, $sTag, $sId)
664 664
     {
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
      * @param string        $sTag               The tag name to be used for the new element
680 680
      * @param string        $sId                The id to assign to the new element
681 681
      *
682
-     * @return \Jaxon\Plugin\Response
682
+     * @return Response
683 683
      */
684 684
     public function insertAfter($sAfter, $sTag, $sId)
685 685
     {
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
      * @param string        $sName                The name of the new input element
702 702
      * @param string        $sId                The id of the new element
703 703
      *
704
-     * @return \Jaxon\Plugin\Response
704
+     * @return Response
705 705
      */
706 706
     public function createInput($sParent, $sType, $sName, $sId)
707 707
     {
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
      * @param string        $sName                The name of the new input element
725 725
      * @param string        $sId                The id of the new element
726 726
      *
727
-     * @return \Jaxon\Plugin\Response
727
+     * @return Response
728 728
      */
729 729
     public function insertInput($sBefore, $sType, $sName, $sId)
730 730
     {
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
      * @param string        $sName                The name of the new input element
748 748
      * @param string        $sId                The id of the new element
749 749
      *
750
-     * @return \Jaxon\Plugin\Response
750
+     * @return Response
751 751
      */
752 752
     public function insertInputAfter($sAfter, $sType, $sName, $sId)
753 753
     {
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
      * @param string        $sEvent                The name of the event
770 770
      * @param string        $sScript            The javascript to execute when the event is fired
771 771
      *
772
-     * @return \Jaxon\Plugin\Response
772
+     * @return Response
773 773
      */
774 774
     public function setEvent($sTarget, $sEvent, $sScript)
775 775
     {
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
      * @param string        $sTarget            The id of the element that contains the event
790 790
      * @param string        $sScript            The javascript to execute when the event is fired
791 791
      *
792
-     * @return \Jaxon\Plugin\Response
792
+     * @return Response
793 793
      */
794 794
     public function onClick($sTarget, $sScript)
795 795
     {
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
      * @param string        $sEvent                The name of the event
806 806
      * @param string        $sHandler            The javascript function to call when the event is fired
807 807
      *
808
-     * @return \Jaxon\Plugin\Response
808
+     * @return Response
809 809
      */
810 810
     public function addHandler($sTarget, $sEvent, $sHandler)
811 811
     {
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
      * @param string        $sEvent                The name of the event
827 827
      * @param string        $sHandler            The javascript function called when the event is fired
828 828
      *
829
-     * @return \Jaxon\Plugin\Response
829
+     * @return Response
830 830
      */
831 831
     public function removeHandler($sTarget, $sEvent, $sHandler)
832 832
     {
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
      * @param string        $sArgs                Comma separated list of parameter names
848 848
      * @param string        $sScript            The javascript code that will become the body of the function
849 849
      *
850
-     * @return \Jaxon\Plugin\Response
850
+     * @return Response
851 851
      */
852 852
     public function setFunction($sFunction, $sArgs, $sScript)
853 853
     {
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
      * @param string        $sReturnValueVar    The name of the variable that will retain the return value
875 875
      *                                             from the call to the original function
876 876
      *
877
-     * @return \Jaxon\Plugin\Response
877
+     * @return Response
878 878
      */
879 879
     public function wrapFunction($sFunction, $sArgs, $aScripts, $sReturnValueVar)
880 880
     {
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
      * @param string        $sFileName            The relative or fully qualified URI of the javascript file
896 896
      * @param string        $sType                Determines the script type. Defaults to 'text/javascript'
897 897
      *
898
-     * @return \Jaxon\Plugin\Response
898
+     * @return Response
899 899
      */
900 900
     public function includeScript($sFileName, $sType = null, $sId = null)
901 901
     {
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
      * @param string        $sFileName            The relative or fully qualified URI of the javascript file
917 917
      * @param string        $sType                Determines the script type. Defaults to 'text/javascript'
918 918
      *
919
-     * @return \Jaxon\Plugin\Response
919
+     * @return Response
920 920
      */
921 921
     public function includeScriptOnce($sFileName, $sType = null, $sId = null)
922 922
     {
@@ -939,7 +939,7 @@  discard block
 block discarded – undo
939 939
      * @param string        $sFileName            The relative or fully qualified URI of the javascript file
940 940
      * @param string        $sUnload            Name of a javascript function to call prior to unlaoding the file
941 941
      *
942
-     * @return \Jaxon\Plugin\Response
942
+     * @return Response
943 943
      */
944 944
     public function removeScript($sFileName, $sUnload = '')
945 945
     {
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
      * @param string        $sFileName            The relative or fully qualified URI of the css file
961 961
      * @param string        $sMedia                The media type of the CSS file. Defaults to 'screen'
962 962
      *
963
-     * @return \Jaxon\Plugin\Response
963
+     * @return Response
964 964
      */
965 965
     public function includeCSS($sFileName, $sMedia = null)
966 966
     {
@@ -979,7 +979,7 @@  discard block
 block discarded – undo
979 979
      *
980 980
      * @param string        $sFileName            The relative or fully qualified URI of the css file
981 981
      *
982
-     * @return \Jaxon\Plugin\Response
982
+     * @return Response
983 983
      */
984 984
     public function removeCSS($sFileName, $sMedia = null)
985 985
     {
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
      * @param integer        $iTimeout            The number of 1/10ths of a second to pause before timing out
1005 1005
      *                                             and continuing with the execution of the response commands
1006 1006
      *
1007
-     * @return \Jaxon\Plugin\Response
1007
+     * @return Response
1008 1008
      */
1009 1009
     public function waitForCSS($iTimeout = 600)
1010 1010
     {
@@ -1029,7 +1029,7 @@  discard block
 block discarded – undo
1029 1029
      * @param integer        $tenths                The number of 1/10ths of a second to wait before timing out
1030 1030
      *                                             and continuing with the execution of the response commands.
1031 1031
      *
1032
-     * @return \Jaxon\Plugin\Response
1032
+     * @return Response
1033 1033
      */
1034 1034
     public function waitFor($script, $tenths)
1035 1035
     {
@@ -1050,7 +1050,7 @@  discard block
 block discarded – undo
1050 1050
      *
1051 1051
      * @param integer        $tenths                The number of 1/10ths of a second to sleep
1052 1052
      *
1053
-     * @return \Jaxon\Plugin\Response
1053
+     * @return Response
1054 1054
      */
1055 1055
     public function sleep($tenths)
1056 1056
     {
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
      * @param string        $variable            The DOM element name (id or class)
1080 1080
      * @param string        $tag                The HTML tag of the new DOM element
1081 1081
      *
1082
-     * @return \Jaxon\Plugin\Response
1082
+     * @return Response
1083 1083
      */
1084 1084
     public function domCreateElement($variable, $tag)
1085 1085
     {
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
      * @param string        $key                The name of the attribute
1100 1100
      * @param string        $value                The value of the attribute
1101 1101
      *
1102
-     * @return \Jaxon\Plugin\Response
1102
+     * @return Response
1103 1103
      */
1104 1104
     public function domSetAttribute($variable, $key, $value)
1105 1105
     {
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
      * @param string        $skip                The ??
1121 1121
      * @param string        $remove                The ??
1122 1122
      *
1123
-     * @return \Jaxon\Plugin\Response
1123
+     * @return Response
1124 1124
      */
1125 1125
     public function domRemoveChildren($parent, $skip = null, $remove = null)
1126 1126
     {
@@ -1141,7 +1141,7 @@  discard block
 block discarded – undo
1141 1141
      * @param string        $parent                The DOM parent element
1142 1142
      * @param string        $variable            The DOM element name (id or class)
1143 1143
      *
1144
-     * @return \Jaxon\Plugin\Response
1144
+     * @return Response
1145 1145
      */
1146 1146
     public function domAppendChild($parent, $variable)
1147 1147
     {
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
      * @param string        $target                The DOM target element
1161 1161
      * @param string        $variable            The DOM element name (id or class)
1162 1162
      *
1163
-     * @return \Jaxon\Plugin\Response
1163
+     * @return Response
1164 1164
      */
1165 1165
     public function domInsertBefore($target, $variable)
1166 1166
     {
@@ -1179,7 +1179,7 @@  discard block
 block discarded – undo
1179 1179
      * @param string        $target                The DOM target element
1180 1180
      * @param string        $variable            The DOM element name (id or class)
1181 1181
      *
1182
-     * @return \Jaxon\Plugin\Response
1182
+     * @return Response
1183 1183
      */
1184 1184
     public function domInsertAfter($target, $variable)
1185 1185
     {
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
      * @param string        $parent                The DOM parent element
1199 1199
      * @param string        $text                The HTML text to append
1200 1200
      *
1201
-     * @return \Jaxon\Plugin\Response
1201
+     * @return Response
1202 1202
      */
1203 1203
     public function domAppendText($parent, $text)
1204 1204
     {
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
      *
1240 1240
      * @param mixed        $value                Any value
1241 1241
      *
1242
-     * @return \Jaxon\Plugin\Response
1242
+     * @return Response
1243 1243
      */
1244 1244
     public function setReturnValue($value)
1245 1245
     {
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     public function plugin($sName)
102 102
     {
103 103
         $xPlugin = $this->getPluginManager()->getResponsePlugin($sName);
104
-        if(!$xPlugin)
104
+        if (!$xPlugin)
105 105
         {
106 106
             return null;
107 107
         }
@@ -164,21 +164,21 @@  discard block
 block discarded – undo
164 164
     public function addCommand($aAttributes, $mData)
165 165
     {
166 166
         /* merge commands if possible */
167
-        if(in_array($aAttributes['cmd'], array('js', 'ap')))
167
+        if (in_array($aAttributes['cmd'], array('js', 'ap')))
168 168
         {
169
-            if(($aLastCommand = array_pop($this->aCommands)))
169
+            if (($aLastCommand = array_pop($this->aCommands)))
170 170
             {
171
-                if($aLastCommand['cmd'] == $aAttributes['cmd'])
171
+                if ($aLastCommand['cmd'] == $aAttributes['cmd'])
172 172
                 {
173
-                    if($aLastCommand['cmd'] == 'js') 
173
+                    if ($aLastCommand['cmd'] == 'js') 
174 174
                     {
175
-                        $mData = $aLastCommand['data'].'; '.$mData;
175
+                        $mData = $aLastCommand['data'] . '; ' . $mData;
176 176
                     } 
177
-                    else if($aLastCommand['cmd'] == 'ap' &&
177
+                    else if ($aLastCommand['cmd'] == 'ap' &&
178 178
                             $aLastCommand['id'] == $aAttributes['id'] &&
179 179
                             $aLastCommand['prop'] == $aAttributes['prop'])
180 180
                     {
181
-                        $mData = $aLastCommand['data'].' '.$mData;
181
+                        $mData = $aLastCommand['data'] . ' ' . $mData;
182 182
                     }
183 183
                     else
184 184
                     {
@@ -235,11 +235,11 @@  discard block
 block discarded – undo
235 235
      */
236 236
     public function appendResponse($mCommands, $bBefore = false)
237 237
     {
238
-        if( $mCommands instanceof Response )
238
+        if ($mCommands instanceof Response)
239 239
         {
240 240
             $this->returnValue = $mCommands->returnValue;
241 241
             
242
-            if($bBefore)
242
+            if ($bBefore)
243 243
             {
244 244
                 $this->aCommands = array_merge($mCommands->aCommands, $this->aCommands);
245 245
             }
@@ -248,9 +248,9 @@  discard block
 block discarded – undo
248 248
                 $this->aCommands = array_merge($this->aCommands, $mCommands->aCommands);
249 249
             }
250 250
         }
251
-        else if(is_array($mCommands))
251
+        else if (is_array($mCommands))
252 252
         {
253
-            if($bBefore)
253
+            if ($bBefore)
254 254
             {
255 255
                 $this->aCommands = array_merge($mCommands, $this->aCommands);
256 256
             }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         }
262 262
         else
263 263
         {
264
-            if(!empty($mCommands))
264
+            if (!empty($mCommands))
265 265
             {
266 266
                 throw new \Jaxon\Exception\Error($this->trans('errors.response.data.invalid'));
267 267
             }
@@ -529,33 +529,33 @@  discard block
 block discarded – undo
529 529
      *
530 530
      * @return \Jaxon\Plugin\Response
531 531
      */
532
-    public function redirect($sURL, $iDelay=0)
532
+    public function redirect($sURL, $iDelay = 0)
533 533
     {
534 534
         // we need to parse the query part so that the values are rawurlencode()'ed
535 535
         // can't just use parse_url() cos we could be dealing with a relative URL which
536 536
         // parse_url() can't deal with.
537 537
         $queryStart = strpos($sURL, '?', strrpos($sURL, '/'));
538
-        if($queryStart !== false)
538
+        if ($queryStart !== false)
539 539
         {
540 540
             $queryStart++;
541 541
             $queryEnd = strpos($sURL, '#', $queryStart);
542
-            if($queryEnd === false)
542
+            if ($queryEnd === false)
543 543
                 $queryEnd = strlen($sURL);
544
-            $queryPart = substr($sURL, $queryStart, $queryEnd-$queryStart);
544
+            $queryPart = substr($sURL, $queryStart, $queryEnd - $queryStart);
545 545
             parse_str($queryPart, $queryParts);
546 546
             $newQueryPart = "";
547
-            if($queryParts)
547
+            if ($queryParts)
548 548
             {
549 549
                 $first = true;
550
-                foreach($queryParts as $key => $value)
550
+                foreach ($queryParts as $key => $value)
551 551
                 {
552
-                    if($first)
552
+                    if ($first)
553 553
                         $first = false;
554 554
                     else
555 555
                         $newQueryPart .= '&';
556
-                    $newQueryPart .= rawurlencode($key).'='.rawurlencode($value);
556
+                    $newQueryPart .= rawurlencode($key) . '=' . rawurlencode($value);
557 557
                 }
558
-            } else if($_SERVER['QUERY_STRING']) {
558
+            } else if ($_SERVER['QUERY_STRING']) {
559 559
                     //couldn't break up the query, but there's one there
560 560
                     //possibly "http://url/page.html?query1234" type of query?
561 561
                     //just encode it and hope it works
@@ -563,8 +563,8 @@  discard block
 block discarded – undo
563 563
                 }
564 564
             $sURL = str_replace($queryPart, $newQueryPart, $sURL);
565 565
         }
566
-        if($iDelay)
567
-            $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay*1000) . ');');
566
+        if ($iDelay)
567
+            $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay * 1000) . ');');
568 568
         else
569 569
             $this->script('window.location = "' . $sURL . '";');
570 570
         return $this;
@@ -901,10 +901,10 @@  discard block
 block discarded – undo
901 901
     {
902 902
         $command = array('cmd'  =>  'in');
903 903
         
904
-        if(($sType))
904
+        if (($sType))
905 905
             $command['type'] = trim((string)$sType, " \t");
906 906
         
907
-        if(($sId))
907
+        if (($sId))
908 908
             $command['elm_id'] = trim((string)$sId, " \t");
909 909
 
910 910
         return $this->addCommand($command, trim((string)$sFileName, " \t"));
@@ -922,10 +922,10 @@  discard block
 block discarded – undo
922 922
     {
923 923
         $command = array('cmd' => 'ino');
924 924
         
925
-        if(($sType))
925
+        if (($sType))
926 926
             $command['type'] = trim((string)$sType, " \t");
927 927
         
928
-        if(($sId))
928
+        if (($sId))
929 929
             $command['elm_id'] = trim((string)$sId, " \t");
930 930
             
931 931
         return $this->addCommand($command, trim((string)$sFileName, " \t"));
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
     {
967 967
         $command = array('cmd' => 'css');
968 968
         
969
-        if(($sMedia))
969
+        if (($sMedia))
970 970
             $command['media'] = trim((string)$sMedia, " \t");
971 971
         
972 972
         return $this->addCommand($command, trim((string)$sFileName, " \t"));
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
     {
986 986
         $command = array('cmd' => 'rcss');
987 987
         
988
-        if(($sMedia))
988
+        if (($sMedia))
989 989
             $command['media'] = trim((string)$sMedia, " \t");
990 990
         
991 991
         return $this->addCommand($command, trim((string)$sFileName, " \t"));
@@ -1126,10 +1126,10 @@  discard block
 block discarded – undo
1126 1126
     {
1127 1127
         $command = array('cmd' => 'DRC');
1128 1128
 
1129
-        if(($skip))
1129
+        if (($skip))
1130 1130
             $command['skip'] = $skip;
1131 1131
 
1132
-        if(($remove))
1132
+        if (($remove))
1133 1133
             $command['remove'] = $remove;
1134 1134
 
1135 1135
         return $this->addCommand($command, $parent);
@@ -1255,17 +1255,17 @@  discard block
 block discarded – undo
1255 1255
     public function sendHeaders()
1256 1256
     {
1257 1257
         $xRequestManager = $this->getRequestManager();
1258
-        if($xRequestManager->getRequestMethod() == Jaxon::METHOD_GET)
1258
+        if ($xRequestManager->getRequestMethod() == Jaxon::METHOD_GET)
1259 1259
         {
1260
-            header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
1261
-            header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
1262
-            header ("Cache-Control: no-cache, must-revalidate");
1263
-            header ("Pragma: no-cache");
1260
+            header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
1261
+            header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
1262
+            header("Cache-Control: no-cache, must-revalidate");
1263
+            header("Pragma: no-cache");
1264 1264
         }
1265 1265
         
1266 1266
         $sCharacterSet = '';
1267 1267
         $sCharacterEncoding = trim($this->getOption('core.encoding'));
1268
-        if(($sCharacterEncoding) && strlen($sCharacterEncoding) > 0)
1268
+        if (($sCharacterEncoding) && strlen($sCharacterEncoding) > 0)
1269 1269
         {
1270 1270
             $sCharacterSet = '; charset="' . trim($sCharacterEncoding) . '"';
1271 1271
         }
@@ -1282,13 +1282,13 @@  discard block
 block discarded – undo
1282 1282
     {
1283 1283
         $response = array();
1284 1284
         
1285
-        if(($this->returnValue))
1285
+        if (($this->returnValue))
1286 1286
         {
1287 1287
             $response['jxnrv'] = $this->returnValue;
1288 1288
         }
1289 1289
         $response['jxnobj'] = array();
1290 1290
 
1291
-        foreach($this->aCommands as $xCommand)
1291
+        foreach ($this->aCommands as $xCommand)
1292 1292
         {
1293 1293
             $response['jxnobj'][] = $xCommand;
1294 1294
         }
Please login to merge, or discard this patch.