* @ingroup Skins
*/
class MediaWikiI18N {
- private $context = array();
+ private $context = [];
function set( $varName, $value ) {
$this->context[$varName] = $value;
$value = wfMessage( $value )->text();
// interpolate variables
- $m = array();
+ $m = [];
while ( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) {
list( $src, $var ) = $m;
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$varValue = $this->context[$var];
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
$value = str_replace( $src, $varValue, $value );
}
return $value;