protected function i18n($key)
{
if (!is_string($key)) {
throw new InvalidArgumentException(sprintf('Expecting $key to be a string, %s given!', gettype($key)));
}
// use the magic call only when more than one parameter is passed along,
// to get best performance
$argNum = func_num_args();
if ($argNum > 1) {
// pass along all given parameters
$args = func_get_args();
return call_user_func_array(['rex_i18n', 'msg'], $args);
}
return rex_i18n::msg($key);
}