final | |
|---|---|
readonly | |
implements |
JsonSerializable |
A localizable message text — an i18n key plus positional params, the one carrier of everything the server says: action messages, intent results, read refusals.
The key lives in a module's bundle: the one {@see from()} names, else the issuer's default — the action's app for
an action message, the SDK's library (com.laravelui5.sdk) for an intent result. The server resolves it in the
request's language ({@see \LaravelUi5\Sdk\I18n\Texts}); an action message carries the resolved text beside key
and params, and the client takes it as is (ui5-core-lib 6.1).
Positional (not named) because UI5's ResourceBundle.getText(key, aArgs) is positional MessageFormat ({0},
{1}). Params are scalars (string|int|float|bool); no nesting.
| Methods | ||
|---|---|---|
public
|
__construct(
string $key,
array<int, string|int|float|bool> $params = [],
string|null $bundle = null,
string|null $text = null,
)
|
# |
public
static
|
of(string $key, array $params = []): self
|
# |
public
|
from(string $namespace): self
|
# |
public
|
withText(string $text): self
|
# |
public
|
jsonSerialize(): array
|
# |
| Properties | |||
|---|---|---|---|
public
|
string
|
$key
|
# |
public
|
array<int, string|int|float|bool>
|
$params
|
# |
public
|
string|null
|
$bundle
|
# |
public
|
string|null
|
$text
|
# |