src/TwigExtension.php
public function messageFilterCallback( $key /*...*/ ) {
		$params = func_get_args();
		array_shift( $params );
		if ( count( $params ) == 1 && is_array( $params[0] ) ) {
			// Unwrap args array
			$params = $params[0];
		}
		$msg = $this->ctx->message( $key, $params );
		return $msg->plain();
	}
public function messageFilterCallback( $key /*...*/ ) {
		$params = func_get_args();
		array_shift( $params );
		if ( count( $params ) == 1 && is_array( $params[0] ) ) {
			// Unwrap args array
			$params = $params[0];
		}
		$msg = $this->ctx->message( $key, $params );
		return $msg->plain();
	}
Callback for 'message' filter.

<code>
{{ 'my-message-key'|message }}
{{ 'my-message-key'|message( 'foo', 'bar' ) }}
{{ 'my-message-key'|message( [ 'foo', 'bar' ] ) }}
{{ 'my-message-key'|message( 'foo', 'bar' )|raw }}
</code>

@param string $key Message key
@param string ... Message params
@return string Unescaped message content
@see I18nContext::message