@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php echo $this->sPrefix ?><?php echo $this->sAlias ?> = function() { |
| 2 | 2 | return jaxon.request( |
| 3 | 3 | { jxnfun: '<?php echo $this->sFunction ?>' }, |
| 4 | - { parameters: arguments<?php foreach($this->aConfig as $sKey => $sValue): ?>, <?php echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> } |
|
| 4 | + { parameters: arguments<?php foreach ($this->aConfig as $sKey => $sValue): ?>, <?php echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> } |
|
| 5 | 5 | ); |
| 6 | 6 | }; |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php echo $this->sPrefix ?><?php echo $this->sClass ?> = {}; |
| 2 | -<?php foreach($this->aMethods as $aMethod): ?> |
|
| 2 | +<?php foreach ($this->aMethods as $aMethod): ?> |
|
| 3 | 3 | <?php echo $this->sPrefix ?><?php echo $this->sClass ?>.<?php echo $aMethod['name'] ?> = function() { |
| 4 | 4 | return jaxon.request( |
| 5 | 5 | { jxncls: '<?php echo $this->sClass ?>', jxnmthd: '<?php echo $aMethod['name'] ?>' }, |
| 6 | - { parameters: arguments<?php foreach($aMethod['config'] as $sKey => $sValue): ?>, <?php echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> } |
|
| 6 | + { parameters: arguments<?php foreach ($aMethod['config'] as $sKey => $sValue): ?>, <?php echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> } |
|
| 7 | 7 | ); |
| 8 | 8 | }; |
| 9 | 9 | <?php endforeach ?> |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php echo $this->sPrefix ?><?php echo $this->sEvent ?> = function() { |
| 2 | 2 | return jaxon.request( |
| 3 | 3 | { jxnevt: '<?php echo $this->sEvent ?>' }, |
| 4 | - { parameters: arguments<?php if(($this->sMode)): ?>, mode: '<?php echo $this->sMode ?>'<?php endif ?><?php if(($this->sMethod)): ?>, method: '<?php echo $this->sMethod ?>'<?php endif ?> } |
|
| 4 | + { parameters: arguments<?php if (($this->sMode)): ?>, mode: '<?php echo $this->sMode ?>'<?php endif ?><?php if (($this->sMethod)): ?>, method: '<?php echo $this->sMethod ?>'<?php endif ?> } |
|
| 5 | 5 | ); |
| 6 | 6 | }; |
@@ -1,3 +1,3 @@ |
||
| 1 | -<?php foreach($this->aUrls as $sUrl): ?> |
|
| 1 | +<?php foreach ($this->aUrls as $sUrl): ?> |
|
| 2 | 2 | <script type="text/javascript" src="<?php echo $sUrl ?>" <?php echo $this->sJsOptions ?> charset="UTF-8"></script> |
| 3 | 3 | <?php endforeach ?> |
@@ -14,14 +14,14 @@ |
||
| 14 | 14 | jaxon.config.defaultMode = "<?php echo $this->sDefaultMode ?>"; |
| 15 | 15 | jaxon.config.defaultMethod = "<?php echo $this->sDefaultMethod ?>"; |
| 16 | 16 | jaxon.config.responseType = "<?php echo $this->sResponseType ?>"; |
| 17 | -<?php if($this->nResponseQueueSize > 0): ?> |
|
| 17 | +<?php if ($this->nResponseQueueSize > 0): ?> |
|
| 18 | 18 | jaxon.config.responseQueueSize = <?php echo $this->nResponseQueueSize ?>; |
| 19 | 19 | <?php endif ?> |
| 20 | -<?php if(($this->bDebug) && ($this->sDebugOutputID)): ?> |
|
| 20 | +<?php if (($this->bDebug) && ($this->sDebugOutputID)): ?> |
|
| 21 | 21 | jaxon.debug = {}; |
| 22 | 22 | jaxon.debug.outputID = "<?php echo $this->sDebugOutputID ?>"; |
| 23 | 23 | <?php endif ?> |
| 24 | -<?php if(($this->sCsrfMetaName)): ?> |
|
| 24 | +<?php if (($this->sCsrfMetaName)): ?> |
|
| 25 | 25 | metaTags = document.getElementsByTagName('meta'); |
| 26 | 26 | for(i = 0; i < metaTags.length; i++) |
| 27 | 27 | { |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | jaxon.dom.ready(function() { |
| 2 | 2 | jaxon.command.handler.register('cc', jaxon.confirm.commands); |
| 3 | 3 | |
| 4 | -<?php if($this->sPluginScript): ?> |
|
| 4 | +<?php if ($this->sPluginScript): ?> |
|
| 5 | 5 | <?php echo $this->sPluginScript ?> |
| 6 | 6 | <?php endif ?> |
| 7 | 7 | }); |
@@ -23,7 +23,6 @@ discard block |
||
| 23 | 23 | * Return the javascript call to a Jaxon function or object method |
| 24 | 24 | * |
| 25 | 25 | * @param string $sName The function or method (with class) name |
| 26 | - * @param ... $xParams The parameters of the function or method |
|
| 27 | 26 | * |
| 28 | 27 | * @return \Jaxon\Request\Request |
| 29 | 28 | */ |
@@ -46,7 +45,6 @@ discard block |
||
| 46 | 45 | * Return the javascript call to a generic function |
| 47 | 46 | * |
| 48 | 47 | * @param string $sName The function or method (with class) name |
| 49 | - * @param ... $xParams The parameters of the function or method |
|
| 50 | 48 | * |
| 51 | 49 | * @return \Jaxon\Request\Request |
| 52 | 50 | */ |
@@ -70,7 +68,6 @@ discard block |
||
| 70 | 68 | * @param integer $nItemsPerPage The number of items per page page |
| 71 | 69 | * @param integer $nCurrentPage The current page |
| 72 | 70 | * @param string $sMethod The name of function or a method prepended with its class name |
| 73 | - * @param ... $xParams The parameters of the function or method |
|
| 74 | 71 | * |
| 75 | 72 | * @return string the pagination links |
| 76 | 73 | */ |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | * |
| 101 | 101 | * @param array $aArgs An array containing the callable object specification |
| 102 | 102 | * |
| 103 | - * @return array |
|
| 103 | + * @return boolean |
|
| 104 | 104 | */ |
| 105 | 105 | public function register($aArgs) |
| 106 | 106 | { |
@@ -130,8 +130,9 @@ discard block |
||
| 130 | 130 | { |
| 131 | 131 | foreach($aValue as $sName => $sValue) |
| 132 | 132 | { |
| 133 | - if($sName == 'classpath' && $sValue != '') |
|
| 134 | - $this->aClassPaths[] = $sValue; |
|
| 133 | + if($sName == 'classpath' && $sValue != '') { |
|
| 134 | + $this->aClassPaths[] = $sValue; |
|
| 135 | + } |
|
| 135 | 136 | $xCallableObject->configure($sKey, $sName, $sValue); |
| 136 | 137 | } |
| 137 | 138 | } |
@@ -225,8 +226,9 @@ discard block |
||
| 225 | 226 | */ |
| 226 | 227 | public function processRequest() |
| 227 | 228 | { |
| 228 | - if(!$this->canProcessRequest()) |
|
| 229 | - return false; |
|
| 229 | + if(!$this->canProcessRequest()) { |
|
| 230 | + return false; |
|
| 231 | + } |
|
| 230 | 232 | |
| 231 | 233 | $aArgs = $this->getRequestManager()->process(); |
| 232 | 234 | |
@@ -67,19 +67,19 @@ discard block |
||
| 67 | 67 | $this->sRequestedClass = null; |
| 68 | 68 | $this->sRequestedMethod = null; |
| 69 | 69 | |
| 70 | - if(!empty($_GET['jxncls'])) |
|
| 70 | + if (!empty($_GET['jxncls'])) |
|
| 71 | 71 | { |
| 72 | 72 | $this->sRequestedClass = $_GET['jxncls']; |
| 73 | 73 | } |
| 74 | - if(!empty($_GET['jxnmthd'])) |
|
| 74 | + if (!empty($_GET['jxnmthd'])) |
|
| 75 | 75 | { |
| 76 | 76 | $this->sRequestedMethod = $_GET['jxnmthd']; |
| 77 | 77 | } |
| 78 | - if(!empty($_POST['jxncls'])) |
|
| 78 | + if (!empty($_POST['jxncls'])) |
|
| 79 | 79 | { |
| 80 | 80 | $this->sRequestedClass = $_POST['jxncls']; |
| 81 | 81 | } |
| 82 | - if(!empty($_POST['jxnmthd'])) |
|
| 82 | + if (!empty($_POST['jxnmthd'])) |
|
| 83 | 83 | { |
| 84 | 84 | $this->sRequestedMethod = $_POST['jxnmthd']; |
| 85 | 85 | } |
@@ -104,33 +104,33 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function register($aArgs) |
| 106 | 106 | { |
| 107 | - if(count($aArgs) > 1) |
|
| 107 | + if (count($aArgs) > 1) |
|
| 108 | 108 | { |
| 109 | 109 | $sType = $aArgs[0]; |
| 110 | 110 | |
| 111 | - if($sType == Jaxon::CALLABLE_OBJECT) |
|
| 111 | + if ($sType == Jaxon::CALLABLE_OBJECT) |
|
| 112 | 112 | { |
| 113 | 113 | $xCallableObject = $aArgs[1]; |
| 114 | 114 | |
| 115 | - if(!is_object($xCallableObject) && !is_string($xCallableObject)) |
|
| 115 | + if (!is_object($xCallableObject) && !is_string($xCallableObject)) |
|
| 116 | 116 | { |
| 117 | 117 | throw new \Jaxon\Exception\Error($this->trans('errors.objects.instance')); |
| 118 | 118 | } |
| 119 | - if(is_string($xCallableObject) && !class_exists($xCallableObject)) |
|
| 119 | + if (is_string($xCallableObject) && !class_exists($xCallableObject)) |
|
| 120 | 120 | { |
| 121 | 121 | throw new \Jaxon\Exception\Error($this->trans('errors.objects.instance')); |
| 122 | 122 | } |
| 123 | - if(!($xCallableObject instanceof \Jaxon\Request\Support\CallableObject)) |
|
| 123 | + if (!($xCallableObject instanceof \Jaxon\Request\Support\CallableObject)) |
|
| 124 | 124 | { |
| 125 | 125 | $xCallableObject = new \Jaxon\Request\Support\CallableObject($xCallableObject); |
| 126 | 126 | } |
| 127 | - if(count($aArgs) > 2 && is_array($aArgs[2])) |
|
| 127 | + if (count($aArgs) > 2 && is_array($aArgs[2])) |
|
| 128 | 128 | { |
| 129 | - foreach($aArgs[2] as $sKey => $aValue) |
|
| 129 | + foreach ($aArgs[2] as $sKey => $aValue) |
|
| 130 | 130 | { |
| 131 | - foreach($aValue as $sName => $sValue) |
|
| 131 | + foreach ($aValue as $sName => $sValue) |
|
| 132 | 132 | { |
| 133 | - if($sName == 'classpath' && $sValue != '') |
|
| 133 | + if ($sName == 'classpath' && $sValue != '') |
|
| 134 | 134 | $this->aClassPaths[] = $sValue; |
| 135 | 135 | $xCallableObject->configure($sKey, $sName, $sValue); |
| 136 | 136 | } |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | public function generateHash() |
| 156 | 156 | { |
| 157 | 157 | $sHash = ''; |
| 158 | - foreach($this->aCallableObjects as $xCallableObject) |
|
| 158 | + foreach ($this->aCallableObjects as $xCallableObject) |
|
| 159 | 159 | { |
| 160 | 160 | $sHash .= $xCallableObject->getName(); |
| 161 | 161 | $sHash .= implode('|', $xCallableObject->getMethods()); |
@@ -174,15 +174,15 @@ discard block |
||
| 174 | 174 | // Generate code for javascript classes declaration |
| 175 | 175 | $code = ''; |
| 176 | 176 | $classes = array(); |
| 177 | - foreach($this->aClassPaths as $sClassPath) |
|
| 177 | + foreach ($this->aClassPaths as $sClassPath) |
|
| 178 | 178 | { |
| 179 | 179 | $offset = 0; |
| 180 | 180 | $sClassPath .= '.Null'; // This is a sentinel. The last token is not processed in the while loop. |
| 181 | - while(($dotPosition = strpos($sClassPath, '.', $offset)) !== false) |
|
| 181 | + while (($dotPosition = strpos($sClassPath, '.', $offset)) !== false) |
|
| 182 | 182 | { |
| 183 | 183 | $class = substr($sClassPath, 0, $dotPosition); |
| 184 | 184 | // Generate code for this class |
| 185 | - if(!array_key_exists($class, $classes)) |
|
| 185 | + if (!array_key_exists($class, $classes)) |
|
| 186 | 186 | { |
| 187 | 187 | $code .= "$sJaxonPrefix$class = {};\n"; |
| 188 | 188 | $classes[$class] = $class; |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - foreach($this->aCallableObjects as $xCallableObject) |
|
| 194 | + foreach ($this->aCallableObjects as $xCallableObject) |
|
| 195 | 195 | { |
| 196 | 196 | $code .= $xCallableObject->getScript(); |
| 197 | 197 | } |
@@ -206,13 +206,13 @@ discard block |
||
| 206 | 206 | public function canProcessRequest() |
| 207 | 207 | { |
| 208 | 208 | // Check the validity of the class name |
| 209 | - if(($this->sRequestedClass) && !$this->validateClass($this->sRequestedClass)) |
|
| 209 | + if (($this->sRequestedClass) && !$this->validateClass($this->sRequestedClass)) |
|
| 210 | 210 | { |
| 211 | 211 | $this->sRequestedClass = null; |
| 212 | 212 | $this->sRequestedMethod = null; |
| 213 | 213 | } |
| 214 | 214 | // Check the validity of the method name |
| 215 | - if(($this->sRequestedMethod) && !$this->validateMethod($this->sRequestedMethod)) |
|
| 215 | + if (($this->sRequestedMethod) && !$this->validateMethod($this->sRequestedMethod)) |
|
| 216 | 216 | { |
| 217 | 217 | $this->sRequestedClass = null; |
| 218 | 218 | $this->sRequestedMethod = null; |
@@ -227,20 +227,20 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | public function processRequest() |
| 229 | 229 | { |
| 230 | - if(!$this->canProcessRequest()) |
|
| 230 | + if (!$this->canProcessRequest()) |
|
| 231 | 231 | return false; |
| 232 | 232 | |
| 233 | 233 | $aArgs = $this->getRequestManager()->process(); |
| 234 | 234 | |
| 235 | 235 | // Register an instance of the requested class, if it isn't yet |
| 236 | - if(!($xCallableObject = $this->getCallableObject($this->sRequestedClass))) |
|
| 236 | + if (!($xCallableObject = $this->getCallableObject($this->sRequestedClass))) |
|
| 237 | 237 | { |
| 238 | 238 | $this->getPluginManager()->registerClass($this->sRequestedClass); |
| 239 | 239 | $xCallableObject = $this->getCallableObject($this->sRequestedClass); |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | // Find the requested method |
| 243 | - if(!$xCallableObject || !$xCallableObject->hasMethod($this->sRequestedMethod)) |
|
| 243 | + if (!$xCallableObject || !$xCallableObject->hasMethod($this->sRequestedMethod)) |
|
| 244 | 244 | { |
| 245 | 245 | // Unable to find the requested object or method |
| 246 | 246 | throw new \Jaxon\Exception\Error($this->trans('errors.objects.invalid', |
@@ -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 | - elseif($aLastCommand['cmd'] == 'ap' && |
|
| 177 | + elseif ($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 | - elseif(is_array($mCommands)) |
|
| 251 | + elseif (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 | - } elseif($_SERVER['QUERY_STRING']) { |
|
| 558 | + } elseif ($_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,7 +1255,7 @@ 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 | 1260 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
| 1261 | 1261 | header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
@@ -1265,7 +1265,7 @@ discard block |
||
| 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 | } |
@@ -173,19 +173,16 @@ discard block |
||
| 173 | 173 | if($aLastCommand['cmd'] == 'js') |
| 174 | 174 | { |
| 175 | 175 | $mData = $aLastCommand['data'].'; '.$mData; |
| 176 | - } |
|
| 177 | - elseif($aLastCommand['cmd'] == 'ap' && |
|
| 176 | + } elseif($aLastCommand['cmd'] == 'ap' && |
|
| 178 | 177 | $aLastCommand['id'] == $aAttributes['id'] && |
| 179 | 178 | $aLastCommand['prop'] == $aAttributes['prop']) |
| 180 | 179 | { |
| 181 | 180 | $mData = $aLastCommand['data'].' '.$mData; |
| 182 | - } |
|
| 183 | - else |
|
| 181 | + } else |
|
| 184 | 182 | { |
| 185 | 183 | $this->aCommands[] = $aLastCommand; |
| 186 | 184 | } |
| 187 | - } |
|
| 188 | - else |
|
| 185 | + } else |
|
| 189 | 186 | { |
| 190 | 187 | $this->aCommands[] = $aLastCommand; |
| 191 | 188 | } |
@@ -242,24 +239,20 @@ discard block |
||
| 242 | 239 | if($bBefore) |
| 243 | 240 | { |
| 244 | 241 | $this->aCommands = array_merge($mCommands->aCommands, $this->aCommands); |
| 245 | - } |
|
| 246 | - else |
|
| 242 | + } else |
|
| 247 | 243 | { |
| 248 | 244 | $this->aCommands = array_merge($this->aCommands, $mCommands->aCommands); |
| 249 | 245 | } |
| 250 | - } |
|
| 251 | - elseif(is_array($mCommands)) |
|
| 246 | + } elseif(is_array($mCommands)) |
|
| 252 | 247 | { |
| 253 | 248 | if($bBefore) |
| 254 | 249 | { |
| 255 | 250 | $this->aCommands = array_merge($mCommands, $this->aCommands); |
| 256 | - } |
|
| 257 | - else |
|
| 251 | + } else |
|
| 258 | 252 | { |
| 259 | 253 | $this->aCommands = array_merge($this->aCommands, $mCommands); |
| 260 | 254 | } |
| 261 | - } |
|
| 262 | - else |
|
| 255 | + } else |
|
| 263 | 256 | { |
| 264 | 257 | if(!empty($mCommands)) |
| 265 | 258 | { |
@@ -539,8 +532,9 @@ discard block |
||
| 539 | 532 | { |
| 540 | 533 | $queryStart++; |
| 541 | 534 | $queryEnd = strpos($sURL, '#', $queryStart); |
| 542 | - if($queryEnd === false) |
|
| 543 | - $queryEnd = strlen($sURL); |
|
| 535 | + if($queryEnd === false) { |
|
| 536 | + $queryEnd = strlen($sURL); |
|
| 537 | + } |
|
| 544 | 538 | $queryPart = substr($sURL, $queryStart, $queryEnd-$queryStart); |
| 545 | 539 | parse_str($queryPart, $queryParts); |
| 546 | 540 | $newQueryPart = ""; |
@@ -549,10 +543,11 @@ discard block |
||
| 549 | 543 | $first = true; |
| 550 | 544 | foreach($queryParts as $key => $value) |
| 551 | 545 | { |
| 552 | - if($first) |
|
| 553 | - $first = false; |
|
| 554 | - else |
|
| 555 | - $newQueryPart .= '&'; |
|
| 546 | + if($first) { |
|
| 547 | + $first = false; |
|
| 548 | + } else { |
|
| 549 | + $newQueryPart .= '&'; |
|
| 550 | + } |
|
| 556 | 551 | $newQueryPart .= rawurlencode($key).'='.rawurlencode($value); |
| 557 | 552 | } |
| 558 | 553 | } elseif($_SERVER['QUERY_STRING']) { |
@@ -563,10 +558,11 @@ discard block |
||
| 563 | 558 | } |
| 564 | 559 | $sURL = str_replace($queryPart, $newQueryPart, $sURL); |
| 565 | 560 | } |
| 566 | - if($iDelay) |
|
| 567 | - $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay*1000) . ');'); |
|
| 568 | - else |
|
| 569 | - $this->script('window.location = "' . $sURL . '";'); |
|
| 561 | + if($iDelay) { |
|
| 562 | + $this->script('window.setTimeout("window.location = \'' . $sURL . '\';",' . ($iDelay*1000) . ');'); |
|
| 563 | + } else { |
|
| 564 | + $this->script('window.location = "' . $sURL . '";'); |
|
| 565 | + } |
|
| 570 | 566 | return $this; |
| 571 | 567 | } |
| 572 | 568 | |
@@ -901,11 +897,13 @@ discard block |
||
| 901 | 897 | { |
| 902 | 898 | $command = array('cmd' => 'in'); |
| 903 | 899 | |
| 904 | - if(($sType)) |
|
| 905 | - $command['type'] = trim((string)$sType, " \t"); |
|
| 900 | + if(($sType)) { |
|
| 901 | + $command['type'] = trim((string)$sType, " \t"); |
|
| 902 | + } |
|
| 906 | 903 | |
| 907 | - if(($sId)) |
|
| 908 | - $command['elm_id'] = trim((string)$sId, " \t"); |
|
| 904 | + if(($sId)) { |
|
| 905 | + $command['elm_id'] = trim((string)$sId, " \t"); |
|
| 906 | + } |
|
| 909 | 907 | |
| 910 | 908 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
| 911 | 909 | } |
@@ -922,11 +920,13 @@ discard block |
||
| 922 | 920 | { |
| 923 | 921 | $command = array('cmd' => 'ino'); |
| 924 | 922 | |
| 925 | - if(($sType)) |
|
| 926 | - $command['type'] = trim((string)$sType, " \t"); |
|
| 923 | + if(($sType)) { |
|
| 924 | + $command['type'] = trim((string)$sType, " \t"); |
|
| 925 | + } |
|
| 927 | 926 | |
| 928 | - if(($sId)) |
|
| 929 | - $command['elm_id'] = trim((string)$sId, " \t"); |
|
| 927 | + if(($sId)) { |
|
| 928 | + $command['elm_id'] = trim((string)$sId, " \t"); |
|
| 929 | + } |
|
| 930 | 930 | |
| 931 | 931 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
| 932 | 932 | } |
@@ -966,8 +966,9 @@ discard block |
||
| 966 | 966 | { |
| 967 | 967 | $command = array('cmd' => 'css'); |
| 968 | 968 | |
| 969 | - if(($sMedia)) |
|
| 970 | - $command['media'] = trim((string)$sMedia, " \t"); |
|
| 969 | + if(($sMedia)) { |
|
| 970 | + $command['media'] = trim((string)$sMedia, " \t"); |
|
| 971 | + } |
|
| 971 | 972 | |
| 972 | 973 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
| 973 | 974 | } |
@@ -985,8 +986,9 @@ discard block |
||
| 985 | 986 | { |
| 986 | 987 | $command = array('cmd' => 'rcss'); |
| 987 | 988 | |
| 988 | - if(($sMedia)) |
|
| 989 | - $command['media'] = trim((string)$sMedia, " \t"); |
|
| 989 | + if(($sMedia)) { |
|
| 990 | + $command['media'] = trim((string)$sMedia, " \t"); |
|
| 991 | + } |
|
| 990 | 992 | |
| 991 | 993 | return $this->addCommand($command, trim((string)$sFileName, " \t")); |
| 992 | 994 | } |
@@ -1126,11 +1128,13 @@ discard block |
||
| 1126 | 1128 | { |
| 1127 | 1129 | $command = array('cmd' => 'DRC'); |
| 1128 | 1130 | |
| 1129 | - if(($skip)) |
|
| 1130 | - $command['skip'] = $skip; |
|
| 1131 | + if(($skip)) { |
|
| 1132 | + $command['skip'] = $skip; |
|
| 1133 | + } |
|
| 1131 | 1134 | |
| 1132 | - if(($remove)) |
|
| 1133 | - $command['remove'] = $remove; |
|
| 1135 | + if(($remove)) { |
|
| 1136 | + $command['remove'] = $remove; |
|
| 1137 | + } |
|
| 1134 | 1138 | |
| 1135 | 1139 | return $this->addCommand($command, $parent); |
| 1136 | 1140 | } |