| @@ 86-96 (lines=11) @@ | ||
| 83 | * The function also has other parameters that are arguments for the message |
|
| 84 | * @return string Message with arguments replaced |
|
| 85 | */ |
|
| 86 | public function msg( $key, $fallback /*[, params...] */ ) { |
|
| 87 | $args = array_slice( func_get_args(), 2 ); |
|
| 88 | ||
| 89 | if ( $this->useMessageCache() ) { |
|
| 90 | try { |
|
| 91 | return wfMessage( $key, $args )->text(); |
|
| 92 | } catch ( Exception $e ) { |
|
| 93 | } |
|
| 94 | } |
|
| 95 | return wfMsgReplaceArgs( $fallback, $args ); |
|
| 96 | } |
|
| 97 | ||
| 98 | /** |
|
| 99 | * If $wgShowExceptionDetails is true, return a HTML message with a |
|
| @@ 246-253 (lines=8) @@ | ||
| 243 | * The function also has other parameters that are arguments for the message |
|
| 244 | * @return string Message with arguments replaced |
|
| 245 | */ |
|
| 246 | private static function msg( $key, $fallback /*[, params...] */ ) { |
|
| 247 | $args = array_slice( func_get_args(), 2 ); |
|
| 248 | try { |
|
| 249 | return wfMessage( $key, $args )->text(); |
|
| 250 | } catch ( Exception $e ) { |
|
| 251 | return wfMsgReplaceArgs( $fallback, $args ); |
|
| 252 | } |
|
| 253 | } |
|
| 254 | ||
| 255 | /** |
|
| 256 | * @param Exception|Throwable $e |
|