@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | protected function getPrevLink() |
57 | 57 | { |
58 | - if(!($sCall = $this->xPaginator->getPrevCall())) |
|
58 | + if (!($sCall = $this->xPaginator->getPrevCall())) |
|
59 | 59 | { |
60 | 60 | return ''; |
61 | 61 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | protected function getNextLink() |
71 | 71 | { |
72 | - if(!($sCall = $this->xPaginator->getNextCall())) |
|
72 | + if (!($sCall = $this->xPaginator->getNextCall())) |
|
73 | 73 | { |
74 | 74 | return ''; |
75 | 75 | } |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | protected function getLinks() |
85 | 85 | { |
86 | 86 | $sLinks = ''; |
87 | - foreach($this->xPaginator->getPages() as $page) |
|
87 | + foreach ($this->xPaginator->getPages() as $page) |
|
88 | 88 | { |
89 | - if($page['call']) |
|
89 | + if ($page['call']) |
|
90 | 90 | { |
91 | 91 | $sTemplate = ($page['isCurrent'] ? 'pagination::links/current' : 'pagination::links/enabled'); |
92 | 92 | $sLinks .= $this->_render($sTemplate, ['call' => $page['call'], 'text' => $page['num']]); |
@@ -90,8 +90,7 @@ |
||
90 | 90 | { |
91 | 91 | $sTemplate = ($page['isCurrent'] ? 'pagination::links/current' : 'pagination::links/enabled'); |
92 | 92 | $sLinks .= $this->_render($sTemplate, ['call' => $page['call'], 'text' => $page['num']]); |
93 | - } |
|
94 | - else |
|
93 | + } else |
|
95 | 94 | { |
96 | 95 | $sLinks .= $this->_render('pagination::links/disabled', ['text' => $page['num']]); |
97 | 96 | } |
@@ -29,12 +29,12 @@ discard block |
||
29 | 29 | public static function read($sConfigFile, $sLibKey = '', $sAppKey = null) |
30 | 30 | { |
31 | 31 | $sConfigFile = realpath($sConfigFile); |
32 | - if(!is_readable($sConfigFile)) |
|
32 | + if (!is_readable($sConfigFile)) |
|
33 | 33 | { |
34 | 34 | throw new \Jaxon\Exception\Config\File(jaxon_trans('config.errors.file.access', array('path' => $sConfigFile))); |
35 | 35 | } |
36 | 36 | $aConfigOptions = include($sConfigFile); |
37 | - if(!is_array($aConfigOptions)) |
|
37 | + if (!is_array($aConfigOptions)) |
|
38 | 38 | { |
39 | 39 | throw new \Jaxon\Exception\Config\File(jaxon_trans('config.errors.file.content', array('path' => $sConfigFile))); |
40 | 40 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | // Setup the config options into the library. |
43 | 43 | $jaxon = jaxon(); |
44 | 44 | $jaxon->setOptions($aConfigOptions, $sLibKey); |
45 | - if(!is_string($sAppKey)) |
|
45 | + if (!is_string($sAppKey)) |
|
46 | 46 | { |
47 | 47 | return null; |
48 | 48 | } |
@@ -29,16 +29,16 @@ discard block |
||
29 | 29 | public static function read($sConfigFile, $sLibKey = '', $sAppKey = null) |
30 | 30 | { |
31 | 31 | $sConfigFile = realpath($sConfigFile); |
32 | - if(!extension_loaded('yaml')) |
|
32 | + if (!extension_loaded('yaml')) |
|
33 | 33 | { |
34 | 34 | throw new \Jaxon\Exception\Config\Yaml(jaxon_trans('config.errors.yaml.install')); |
35 | 35 | } |
36 | - if(!is_readable($sConfigFile)) |
|
36 | + if (!is_readable($sConfigFile)) |
|
37 | 37 | { |
38 | 38 | throw new \Jaxon\Exception\Config\File(jaxon_trans('config.errors.file.access', array('path' => $sConfigFile))); |
39 | 39 | } |
40 | 40 | $aConfigOptions = yaml_parse_file($sConfigFile); |
41 | - if(!is_array($aConfigOptions)) |
|
41 | + if (!is_array($aConfigOptions)) |
|
42 | 42 | { |
43 | 43 | throw new \Jaxon\Exception\Config\File(jaxon_trans('config.errors.file.content', array('path' => $sConfigFile))); |
44 | 44 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | // Setup the config options into the library. |
47 | 47 | $jaxon = jaxon(); |
48 | 48 | $jaxon->setOptions($aConfigOptions, $sLibKey); |
49 | - if(!is_string($sAppKey)) |
|
49 | + if (!is_string($sAppKey)) |
|
50 | 50 | { |
51 | 51 | return null; |
52 | 52 | } |
@@ -50,17 +50,17 @@ discard block |
||
50 | 50 | $sPrefix = trim((string)$sPrefix); |
51 | 51 | $nDepth = intval($nDepth); |
52 | 52 | // Check the max depth |
53 | - if($nDepth < 0 || $nDepth > 9) |
|
53 | + if ($nDepth < 0 || $nDepth > 9) |
|
54 | 54 | { |
55 | 55 | throw new \Jaxon\Exception\Config\Data(jaxon_trans('config.errors.data.depth', |
56 | 56 | array('key' => $sPrefix, 'depth' => $nDepth))); |
57 | 57 | } |
58 | 58 | $aValues = false; |
59 | - foreach($aOptions as $sName => $xOption) |
|
59 | + foreach ($aOptions as $sName => $xOption) |
|
60 | 60 | { |
61 | - if(is_int($sName)) |
|
61 | + if (is_int($sName)) |
|
62 | 62 | { |
63 | - if(is_array($aValues)) |
|
63 | + if (is_array($aValues)) |
|
64 | 64 | { |
65 | 65 | $aValues[] = $xOption; |
66 | 66 | } |
@@ -73,18 +73,18 @@ discard block |
||
73 | 73 | |
74 | 74 | $sName = trim($sName); |
75 | 75 | $sFullName = ($sPrefix) ? $sPrefix . '.' . $sName : $sName; |
76 | - if(is_array($xOption)) |
|
76 | + if (is_array($xOption)) |
|
77 | 77 | { |
78 | 78 | // Recursively read the options in the array |
79 | 79 | $this->_setOptions($xOption, $sFullName, $nDepth + 1); |
80 | 80 | } |
81 | - else if(is_string($xOption) || is_numeric($xOption) || is_bool($xOption)) |
|
81 | + else if (is_string($xOption) || is_numeric($xOption) || is_bool($xOption)) |
|
82 | 82 | { |
83 | 83 | // Save the value of this option |
84 | 84 | $this->aOptions[$sFullName] = $xOption; |
85 | 85 | } |
86 | 86 | } |
87 | - if(is_array($aValues) && ($sPrefix)) |
|
87 | + if (is_array($aValues) && ($sPrefix)) |
|
88 | 88 | { |
89 | 89 | $this->aOptions[$sPrefix] = $aValues; |
90 | 90 | } |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | $aKeys = explode('.', (string)$sKeys); |
105 | 105 | foreach ($aKeys as $sKey) |
106 | 106 | { |
107 | - if(($sKey)) |
|
107 | + if (($sKey)) |
|
108 | 108 | { |
109 | - if(!array_key_exists($sKey, $aOptions) || !is_array($aOptions[$sKey])) |
|
109 | + if (!array_key_exists($sKey, $aOptions) || !is_array($aOptions[$sKey])) |
|
110 | 110 | { |
111 | 111 | throw new \Jaxon\Exception\Config\Data(jaxon_trans('config.errors.data.missing', array('key' => $sKeys))); |
112 | 112 | } |
@@ -154,13 +154,12 @@ discard block |
||
154 | 154 | $sPrefix = rtrim($sPrefix, '.') . '.'; |
155 | 155 | $sPrefixLen = strlen($sPrefix); |
156 | 156 | $aOptions = array(); |
157 | - foreach($this->aOptions as $sName => $xValue) |
|
157 | + foreach ($this->aOptions as $sName => $xValue) |
|
158 | 158 | { |
159 | - if(substr($sName, 0, $sPrefixLen) == $sPrefix) |
|
159 | + if (substr($sName, 0, $sPrefixLen) == $sPrefix) |
|
160 | 160 | { |
161 | 161 | $iNextDotPos = strpos($sName, '.', $sPrefixLen); |
162 | - $sOptionName = $iNextDotPos === false ? substr($sName, $sPrefixLen) : |
|
163 | - substr($sName, $sPrefixLen, $iNextDotPos - $sPrefixLen); |
|
162 | + $sOptionName = $iNextDotPos === false ? substr($sName, $sPrefixLen) : substr($sName, $sPrefixLen, $iNextDotPos - $sPrefixLen); |
|
164 | 163 | $aOptions[$sOptionName] = $sPrefix . $sOptionName; |
165 | 164 | } |
166 | 165 | } |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | if(is_array($aValues)) |
64 | 64 | { |
65 | 65 | $aValues[] = $xOption; |
66 | - } |
|
67 | - else |
|
66 | + } else |
|
68 | 67 | { |
69 | 68 | $aValues = array($xOption); |
70 | 69 | } |
@@ -77,8 +76,7 @@ discard block |
||
77 | 76 | { |
78 | 77 | // Recursively read the options in the array |
79 | 78 | $this->_setOptions($xOption, $sFullName, $nDepth + 1); |
80 | - } |
|
81 | - else if(is_string($xOption) || is_numeric($xOption) || is_bool($xOption)) |
|
79 | + } else if(is_string($xOption) || is_numeric($xOption) || is_bool($xOption)) |
|
82 | 80 | { |
83 | 81 | // Save the value of this option |
84 | 82 | $this->aOptions[$sFullName] = $xOption; |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | public static function read($sConfigFile, $sLibKey = '', $sAppKey = null) |
30 | 30 | { |
31 | 31 | $sConfigFile = realpath($sConfigFile); |
32 | - if(!is_readable($sConfigFile)) |
|
32 | + if (!is_readable($sConfigFile)) |
|
33 | 33 | { |
34 | 34 | throw new \Jaxon\Exception\Config\File(jaxon_trans('config.errors.file.access', array('path' => $sConfigFile))); |
35 | 35 | } |
36 | 36 | $sFileContent = file_get_contents($sConfigFile); |
37 | 37 | $aConfigOptions = json_decode($sFileContent, true); |
38 | - if(!is_array($aConfigOptions)) |
|
38 | + if (!is_array($aConfigOptions)) |
|
39 | 39 | { |
40 | 40 | throw new \Jaxon\Exception\Config\File(jaxon_trans('config.errors.file.content', array('path' => $sConfigFile))); |
41 | 41 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $jaxon = jaxon(); |
45 | 45 | $jaxon->setOptions($aConfigOptions, $sLibKey); |
46 | 46 | $config = null; |
47 | - if(is_string($sAppKey)) |
|
47 | + if (is_string($sAppKey)) |
|
48 | 48 | { |
49 | 49 | $config = new Config(); |
50 | 50 | $config->setOptions($aConfigOptions, $sAppKey); |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if(!array_key_exists($sLanguage, $this->aMessages)) |
59 | 59 | { |
60 | 60 | $this->aMessages[$sLanguage] = $aMessages; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->aMessages[$sLanguage] = array_merge($aMessages, $this->aMessages[$sLanguage]); |
65 | 64 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | } |
88 | 88 | if(!array_key_exists($sLanguage, $this->aMessages) || !array_key_exists($sText, $this->aMessages[$sLanguage])) |
89 | 89 | { |
90 | - return $sText; |
|
90 | + return $sText; |
|
91 | 91 | } |
92 | 92 | $message = $this->aMessages[$sLanguage][$sText]; |
93 | 93 | foreach($aPlaceHolders as $name => $value) |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function loadMessages($sFilePath, $sLanguage) |
47 | 47 | { |
48 | - if(!file_exists($sFilePath)) |
|
48 | + if (!file_exists($sFilePath)) |
|
49 | 49 | { |
50 | 50 | return; |
51 | 51 | } |
52 | 52 | $aMessages = require($sFilePath); |
53 | - if(!is_array($aMessages)) |
|
53 | + if (!is_array($aMessages)) |
|
54 | 54 | { |
55 | 55 | return; |
56 | 56 | } |
57 | 57 | // Load the translations |
58 | - if(!array_key_exists($sLanguage, $this->aMessages)) |
|
58 | + if (!array_key_exists($sLanguage, $this->aMessages)) |
|
59 | 59 | { |
60 | 60 | $this->aMessages[$sLanguage] = $aMessages; |
61 | 61 | } |
@@ -77,20 +77,20 @@ discard block |
||
77 | 77 | public function trans($sText, array $aPlaceHolders = array(), $sLanguage = null) |
78 | 78 | { |
79 | 79 | $sText = trim((string)$sText); |
80 | - if(!$sLanguage) |
|
80 | + if (!$sLanguage) |
|
81 | 81 | { |
82 | 82 | $sLanguage = $this->xConfig->getOption('language'); |
83 | 83 | } |
84 | - if(!$sLanguage) |
|
84 | + if (!$sLanguage) |
|
85 | 85 | { |
86 | 86 | $sLanguage = $this->sDefaultLocale; |
87 | 87 | } |
88 | - if(!array_key_exists($sLanguage, $this->aMessages) || !array_key_exists($sText, $this->aMessages[$sLanguage])) |
|
88 | + if (!array_key_exists($sLanguage, $this->aMessages) || !array_key_exists($sText, $this->aMessages[$sLanguage])) |
|
89 | 89 | { |
90 | 90 | return $sText; |
91 | 91 | } |
92 | 92 | $message = $this->aMessages[$sLanguage][$sText]; |
93 | - foreach($aPlaceHolders as $name => $value) |
|
93 | + foreach ($aPlaceHolders as $name => $value) |
|
94 | 94 | { |
95 | 95 | $message = str_replace(":$name", $value, $message); |
96 | 96 | } |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | $sSelector = trim($sSelector, " \t"); |
53 | 53 | $sContext = trim($sContext, " \t"); |
54 | 54 | $this->aCalls = array(); |
55 | - if(!$sSelector) |
|
55 | + if (!$sSelector) |
|
56 | 56 | { |
57 | 57 | $this->sSelector = "$(this)"; // If an empty selector is given, use javascript "this" instead |
58 | 58 | } |
59 | - else if(($sContext)) |
|
59 | + else if (($sContext)) |
|
60 | 60 | { |
61 | 61 | $this->sSelector = "$('" . $sSelector . "', $('" . $sContext . "'))"; |
62 | 62 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function getScript() |
114 | 114 | { |
115 | - if(count($this->aCalls) == 0) |
|
115 | + if (count($this->aCalls) == 0) |
|
116 | 116 | { |
117 | 117 | return $this->sSelector; |
118 | 118 | } |
@@ -55,12 +55,10 @@ |
||
55 | 55 | if(!$sSelector) |
56 | 56 | { |
57 | 57 | $this->sSelector = "$(this)"; // If an empty selector is given, use javascript "this" instead |
58 | - } |
|
59 | - else if(($sContext)) |
|
58 | + } else if(($sContext)) |
|
60 | 59 | { |
61 | 60 | $this->sSelector = "$('" . $sSelector . "', $('" . $sContext . "'))"; |
62 | - } |
|
63 | - else |
|
61 | + } else |
|
64 | 62 | { |
65 | 63 | $this->sSelector = "$('" . $sSelector . "')"; |
66 | 64 | } |
@@ -169,19 +169,16 @@ discard block |
||
169 | 169 | if($aLastCommand['cmd'] == 'js') |
170 | 170 | { |
171 | 171 | $mData = $aLastCommand['data'].'; '.$mData; |
172 | - } |
|
173 | - else if($aLastCommand['cmd'] == 'ap' && |
|
172 | + } else if($aLastCommand['cmd'] == 'ap' && |
|
174 | 173 | $aLastCommand['id'] == $aAttributes['id'] && |
175 | 174 | $aLastCommand['prop'] == $aAttributes['prop']) |
176 | 175 | { |
177 | 176 | $mData = $aLastCommand['data'].' '.$mData; |
178 | - } |
|
179 | - else |
|
177 | + } else |
|
180 | 178 | { |
181 | 179 | $this->aCommands[] = $aLastCommand; |
182 | 180 | } |
183 | - } |
|
184 | - else |
|
181 | + } else |
|
185 | 182 | { |
186 | 183 | $this->aCommands[] = $aLastCommand; |
187 | 184 | } |
@@ -238,24 +235,20 @@ discard block |
||
238 | 235 | if($bBefore) |
239 | 236 | { |
240 | 237 | $this->aCommands = array_merge($mCommands->aCommands, $this->aCommands); |
241 | - } |
|
242 | - else |
|
238 | + } else |
|
243 | 239 | { |
244 | 240 | $this->aCommands = array_merge($this->aCommands, $mCommands->aCommands); |
245 | 241 | } |
246 | - } |
|
247 | - else if(is_array($mCommands)) |
|
242 | + } else if(is_array($mCommands)) |
|
248 | 243 | { |
249 | 244 | if($bBefore) |
250 | 245 | { |
251 | 246 | $this->aCommands = array_merge($mCommands, $this->aCommands); |
252 | - } |
|
253 | - else |
|
247 | + } else |
|
254 | 248 | { |
255 | 249 | $this->aCommands = array_merge($this->aCommands, $mCommands); |
256 | 250 | } |
257 | - } |
|
258 | - else |
|
251 | + } else |
|
259 | 252 | { |
260 | 253 | if(!empty($mCommands)) |
261 | 254 | { |
@@ -535,8 +528,9 @@ discard block |
||
535 | 528 | { |
536 | 529 | $queryStart++; |
537 | 530 | $queryEnd = strpos($sURL, '#', $queryStart); |
538 | - if($queryEnd === false) |
|
539 | - $queryEnd = strlen($sURL); |
|
531 | + if($queryEnd === false) { |
|
532 | + $queryEnd = strlen($sURL); |
|
533 | + } |
|
540 | 534 | $queryPart = substr($sURL, $queryStart, $queryEnd-$queryStart); |
541 | 535 | parse_str($queryPart, $queryParts); |
542 | 536 | $newQueryPart = ""; |
@@ -545,10 +539,11 @@ discard block |
||
545 | 539 | $first = true; |
546 | 540 | foreach($queryParts as $key => $value) |
547 | 541 | { |
548 | - if($first) |
|
549 | - $first = false; |
|
550 | - else |
|
551 | - $newQueryPart .= '&'; |
|
542 | + if($first) { |
|
543 | + $first = false; |
|
544 | + } else { |
|
545 | + $newQueryPart .= '&'; |
|
546 | + } |
|
552 | 547 | $newQueryPart .= rawurlencode($key).'='.rawurlencode($value); |
553 | 548 | } |
554 | 549 | } else if($_SERVER['QUERY_STRING']) { |
@@ -559,10 +554,11 @@ discard block |
||
559 | 554 | } |
560 | 555 | $sURL = str_replace($queryPart, $newQueryPart, $sURL); |
561 | 556 | } |
562 | - if($iDelay) |
|
563 | - $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay*1000) . ');'); |
|
564 | - else |
|
565 | - $this->script('window.location = "' . $sURL . '";'); |
|
557 | + if($iDelay) { |
|
558 | + $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay*1000) . ');'); |
|
559 | + } else { |
|
560 | + $this->script('window.location = "' . $sURL . '";'); |
|
561 | + } |
|
566 | 562 | return $this; |
567 | 563 | } |
568 | 564 | |
@@ -897,11 +893,13 @@ discard block |
||
897 | 893 | { |
898 | 894 | $command = array('cmd' => 'in'); |
899 | 895 | |
900 | - if(($sType)) |
|
901 | - $command['type'] = trim((string)$sType, " \t"); |
|
896 | + if(($sType)) { |
|
897 | + $command['type'] = trim((string)$sType, " \t"); |
|
898 | + } |
|
902 | 899 | |
903 | - if(($sId)) |
|
904 | - $command['elm_id'] = trim((string)$sId, " \t"); |
|
900 | + if(($sId)) { |
|
901 | + $command['elm_id'] = trim((string)$sId, " \t"); |
|
902 | + } |
|
905 | 903 | |
906 | 904 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
907 | 905 | } |
@@ -918,11 +916,13 @@ discard block |
||
918 | 916 | { |
919 | 917 | $command = array('cmd' => 'ino'); |
920 | 918 | |
921 | - if(($sType)) |
|
922 | - $command['type'] = trim((string)$sType, " \t"); |
|
919 | + if(($sType)) { |
|
920 | + $command['type'] = trim((string)$sType, " \t"); |
|
921 | + } |
|
923 | 922 | |
924 | - if(($sId)) |
|
925 | - $command['elm_id'] = trim((string)$sId, " \t"); |
|
923 | + if(($sId)) { |
|
924 | + $command['elm_id'] = trim((string)$sId, " \t"); |
|
925 | + } |
|
926 | 926 | |
927 | 927 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
928 | 928 | } |
@@ -962,8 +962,9 @@ discard block |
||
962 | 962 | { |
963 | 963 | $command = array('cmd' => 'css'); |
964 | 964 | |
965 | - if(($sMedia)) |
|
966 | - $command['media'] = trim((string)$sMedia, " \t"); |
|
965 | + if(($sMedia)) { |
|
966 | + $command['media'] = trim((string)$sMedia, " \t"); |
|
967 | + } |
|
967 | 968 | |
968 | 969 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
969 | 970 | } |
@@ -981,8 +982,9 @@ discard block |
||
981 | 982 | { |
982 | 983 | $command = array('cmd' => 'rcss'); |
983 | 984 | |
984 | - if(($sMedia)) |
|
985 | - $command['media'] = trim((string)$sMedia, " \t"); |
|
985 | + if(($sMedia)) { |
|
986 | + $command['media'] = trim((string)$sMedia, " \t"); |
|
987 | + } |
|
986 | 988 | |
987 | 989 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
988 | 990 | } |
@@ -1122,11 +1124,13 @@ discard block |
||
1122 | 1124 | { |
1123 | 1125 | $command = array('cmd' => 'DRC'); |
1124 | 1126 | |
1125 | - if(($skip)) |
|
1126 | - $command['skip'] = $skip; |
|
1127 | + if(($skip)) { |
|
1128 | + $command['skip'] = $skip; |
|
1129 | + } |
|
1127 | 1130 | |
1128 | - if(($remove)) |
|
1129 | - $command['remove'] = $remove; |
|
1131 | + if(($remove)) { |
|
1132 | + $command['remove'] = $remove; |
|
1133 | + } |
|
1130 | 1134 | |
1131 | 1135 | return $this->addCommand($command, $parent); |
1132 | 1136 | } |
@@ -159,7 +159,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | { |
@@ -101,7 +101,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | */ |
62 | 62 | function rq($classname = null) |
63 | 63 | { |
64 | - if(($classname)) |
|
64 | + if (($classname)) |
|
65 | 65 | { |
66 | 66 | return jaxon()->sentry()->request($classname); |
67 | 67 | } |