@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | 'core.prefix.event' => 'jaxon_event_', |
130 | 130 | // 'core.request.uri' => '', |
131 | 131 | 'core.request.mode' => 'asynchronous', |
132 | - 'core.request.method' => 'POST', // W3C: Method is case sensitive |
|
132 | + 'core.request.method' => 'POST', // W3C: Method is case sensitive |
|
133 | 133 | 'core.debug.on' => false, |
134 | 134 | 'core.debug.verbose' => false, |
135 | 135 | 'core.process.exit' => true, |
@@ -206,13 +206,13 @@ discard block |
||
206 | 206 | $aArgs = func_get_args(); |
207 | 207 | $nArgs = func_num_args(); |
208 | 208 | |
209 | - if(self::PROCESSING_EVENT == $aArgs[0]) |
|
209 | + if (self::PROCESSING_EVENT == $aArgs[0]) |
|
210 | 210 | { |
211 | - if($nArgs > 2) |
|
211 | + if ($nArgs > 2) |
|
212 | 212 | { |
213 | 213 | $sEvent = $aArgs[1]; |
214 | 214 | $xUserFunction = $aArgs[2]; |
215 | - if(!is_a($xUserFunction, 'Request\\Support\\UserFunction')) |
|
215 | + if (!is_a($xUserFunction, 'Request\\Support\\UserFunction')) |
|
216 | 216 | $xUserFunction = new Request\Support\UserFunction($xUserFunction); |
217 | 217 | $this->aProcessingEvents[$sEvent] = $xUserFunction; |
218 | 218 | return true; |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | public function processRequest() |
297 | 297 | { |
298 | 298 | // Check to see if headers have already been sent out, in which case we can't do our job |
299 | - if(headers_sent($filename, $linenumber)) |
|
299 | + if (headers_sent($filename, $linenumber)) |
|
300 | 300 | { |
301 | 301 | echo $this->trans('errors.output.already-sent', array( |
302 | 302 | 'location' => $filename . ':' . $linenumber |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } |
306 | 306 | |
307 | 307 | // Check if there is a plugin to process this request |
308 | - if(!$this->canProcessRequest()) |
|
308 | + if (!$this->canProcessRequest()) |
|
309 | 309 | { |
310 | 310 | return; |
311 | 311 | } |
@@ -314,18 +314,18 @@ discard block |
||
314 | 314 | $mResult = true; |
315 | 315 | |
316 | 316 | // Handle before processing event |
317 | - if(isset($this->aProcessingEvents[self::PROCESSING_EVENT_BEFORE])) |
|
317 | + if (isset($this->aProcessingEvents[self::PROCESSING_EVENT_BEFORE])) |
|
318 | 318 | { |
319 | 319 | $this->aProcessingEvents[self::PROCESSING_EVENT_BEFORE]->call(array(&$bEndRequest)); |
320 | 320 | } |
321 | 321 | |
322 | - if(!$bEndRequest) |
|
322 | + if (!$bEndRequest) |
|
323 | 323 | { |
324 | 324 | try |
325 | 325 | { |
326 | 326 | $mResult = $this->getPluginManager()->processRequest(); |
327 | 327 | } |
328 | - catch(Exception $e) |
|
328 | + catch (Exception $e) |
|
329 | 329 | { |
330 | 330 | // An exception was thrown while processing the request. |
331 | 331 | // The request missed the corresponding handler function, |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | $xResponseManager->debug($e->getMessage()); |
339 | 339 | $mResult = false; |
340 | 340 | |
341 | - if($e instanceof \Jaxon\Exception\Error) |
|
341 | + if ($e instanceof \Jaxon\Exception\Error) |
|
342 | 342 | { |
343 | 343 | $sEvent = self::PROCESSING_EVENT_INVALID; |
344 | 344 | $aParams = array($e->getMessage()); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $aParams = array($e); |
350 | 350 | } |
351 | 351 | |
352 | - if(isset($this->aProcessingEvents[$sEvent])) |
|
352 | + if (isset($this->aProcessingEvents[$sEvent])) |
|
353 | 353 | { |
354 | 354 | // Call the processing event |
355 | 355 | $this->aProcessingEvents[$sEvent]->call($aParams); |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | } |
363 | 363 | } |
364 | 364 | // Clean the processing buffer |
365 | - if(($this->getOption('core.process.clean'))) |
|
365 | + if (($this->getOption('core.process.clean'))) |
|
366 | 366 | { |
367 | 367 | $er = error_reporting(0); |
368 | 368 | while (ob_get_level() > 0) |
@@ -372,10 +372,10 @@ discard block |
||
372 | 372 | error_reporting($er); |
373 | 373 | } |
374 | 374 | |
375 | - if($mResult === true) |
|
375 | + if ($mResult === true) |
|
376 | 376 | { |
377 | 377 | // Handle after processing event |
378 | - if(isset($this->aProcessingEvents[self::PROCESSING_EVENT_AFTER])) |
|
378 | + if (isset($this->aProcessingEvents[self::PROCESSING_EVENT_AFTER])) |
|
379 | 379 | { |
380 | 380 | $bEndRequest = false; |
381 | 381 | $this->aProcessingEvents[self::PROCESSING_EVENT_AFTER]->call(array($bEndRequest)); |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | |
385 | 385 | $this->getResponseManager()->printDebug(); |
386 | 386 | |
387 | - if(($this->getOption('core.process.exit'))) |
|
387 | + if (($this->getOption('core.process.exit'))) |
|
388 | 388 | { |
389 | 389 | $this->getResponseManager()->sendOutput(); |
390 | 390 | exit(); |
@@ -434,16 +434,16 @@ discard block |
||
434 | 434 | */ |
435 | 435 | public function getScript($bIncludeJs = false, $bIncludeCss = false) |
436 | 436 | { |
437 | - if(!$this->getOption('core.request.uri')) |
|
437 | + if (!$this->getOption('core.request.uri')) |
|
438 | 438 | { |
439 | 439 | $this->setOption('core.request.uri', URI::detect()); |
440 | 440 | } |
441 | 441 | $sCode = ''; |
442 | - if(($bIncludeCss)) |
|
442 | + if (($bIncludeCss)) |
|
443 | 443 | { |
444 | 444 | $sCode .= $this->getPluginManager()->getCss() . "\n"; |
445 | 445 | } |
446 | - if(($bIncludeJs)) |
|
446 | + if (($bIncludeJs)) |
|
447 | 447 | { |
448 | 448 | $sCode .= $this->getPluginManager()->getJs() . "\n"; |
449 | 449 | } |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | public function readConfigFile($sConfigFile, $sLibKey = '', $sAppKey = null) |
542 | 542 | { |
543 | 543 | $sExt = pathinfo($sConfigFile, PATHINFO_EXTENSION); |
544 | - switch($sExt) |
|
544 | + switch ($sExt) |
|
545 | 545 | { |
546 | 546 | case 'php': |
547 | 547 | return $this->readPhpConfigFile($sConfigFile, $sLibKey, $sAppKey); |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function append(Response $xResponse) |
73 | 73 | { |
74 | - if(!$this->xResponse) |
|
74 | + if (!$this->xResponse) |
|
75 | 75 | { |
76 | 76 | $this->xResponse = $xResponse; |
77 | 77 | } |
78 | - else if(get_class($this->xResponse) == get_class($xResponse)) |
|
78 | + else if (get_class($this->xResponse) == get_class($xResponse)) |
|
79 | 79 | { |
80 | - if($this->xResponse != $xResponse) |
|
80 | + if ($this->xResponse != $xResponse) |
|
81 | 81 | { |
82 | 82 | $this->xResponse->appendResponse($xResponse); |
83 | 83 | } |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function printDebug() |
112 | 112 | { |
113 | - if(($this->xResponse)) |
|
113 | + if (($this->xResponse)) |
|
114 | 114 | { |
115 | - foreach($this->aDebugMessages as $sMessage) |
|
115 | + foreach ($this->aDebugMessages as $sMessage) |
|
116 | 116 | { |
117 | 117 | $this->xResponse->debug($sMessage); |
118 | 118 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function sendHeaders() |
129 | 129 | { |
130 | - if(($this->xResponse)) |
|
130 | + if (($this->xResponse)) |
|
131 | 131 | { |
132 | 132 | $this->xResponse->sendHeaders(); |
133 | 133 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function getOutput() |
142 | 142 | { |
143 | - if(($this->xResponse)) |
|
143 | + if (($this->xResponse)) |
|
144 | 144 | { |
145 | 145 | return $this->xResponse->getOutput(); |
146 | 146 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function sendOutput() |
156 | 156 | { |
157 | - if(($this->xResponse)) |
|
157 | + if (($this->xResponse)) |
|
158 | 158 | { |
159 | 159 | $this->xResponse->sendHeaders(); |
160 | 160 | $this->xResponse->printOutput(); |
@@ -74,15 +74,13 @@ |
||
74 | 74 | if(!$this->xResponse) |
75 | 75 | { |
76 | 76 | $this->xResponse = $xResponse; |
77 | - } |
|
78 | - else if(get_class($this->xResponse) == get_class($xResponse)) |
|
77 | + } else if(get_class($this->xResponse) == get_class($xResponse)) |
|
79 | 78 | { |
80 | 79 | if($this->xResponse != $xResponse) |
81 | 80 | { |
82 | 81 | $this->xResponse->appendResponse($xResponse); |
83 | 82 | } |
84 | - } |
|
85 | - else |
|
83 | + } else |
|
86 | 84 | { |
87 | 85 | $this->debug($this->trans('errors.mismatch.types', array('class' => get_class($xResponse)))); |
88 | 86 | } |