@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | /** |
| 63 | 63 | * Instruct the request to use single quotes when generating the javascript |
| 64 | 64 | * |
| 65 | - * @return void |
|
| 65 | + * @return JsCall |
|
| 66 | 66 | */ |
| 67 | 67 | public function useSingleQuote() |
| 68 | 68 | { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * Instruct the request to use single quotes when generating the javascript |
| 75 | 75 | * |
| 76 | - * @return void |
|
| 76 | + * @return JsCall |
|
| 77 | 77 | */ |
| 78 | 78 | public function useSingleQuotes() |
| 79 | 79 | { |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | /** |
| 149 | 149 | * Add a set of parameters to this request |
| 150 | 150 | * |
| 151 | - * @param array $xParameters The parameters |
|
| 151 | + * @param array $aParameters The parameters |
|
| 152 | 152 | * |
| 153 | 153 | * @return void |
| 154 | 154 | */ |
@@ -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 | } |
@@ -131,19 +131,19 @@ |
||
| 131 | 131 | $sValue = substr($sValue, 1); |
| 132 | 132 | switch ($cType) |
| 133 | 133 | { |
| 134 | - case 'S': |
|
| 135 | - $value = ($sValue === false ? '' : $sValue); |
|
| 136 | - break; |
|
| 137 | - case 'B': |
|
| 138 | - $value = $this->__convertStringToBool($sValue); |
|
| 139 | - break; |
|
| 140 | - case 'N': |
|
| 141 | - $value = ($sValue == floor($sValue) ? (int)$sValue : (float)$sValue); |
|
| 142 | - break; |
|
| 143 | - case '*': |
|
| 144 | - default: |
|
| 145 | - $value = null; |
|
| 146 | - break; |
|
| 134 | + case 'S': |
|
| 135 | + $value = ($sValue === false ? '' : $sValue); |
|
| 136 | + break; |
|
| 137 | + case 'B': |
|
| 138 | + $value = $this->__convertStringToBool($sValue); |
|
| 139 | + break; |
|
| 140 | + case 'N': |
|
| 141 | + $value = ($sValue == floor($sValue) ? (int)$sValue : (float)$sValue); |
|
| 142 | + break; |
|
| 143 | + case '*': |
|
| 144 | + default: |
|
| 145 | + $value = null; |
|
| 146 | + break; |
|
| 147 | 147 | } |
| 148 | 148 | return $value; |
| 149 | 149 | } |