Class for translatable messages, which only occur in singular form.
The message might include replacements, in the form %[A-Za-z]%. Those are replaced by the values provided. A raw % can be escaped like %%.
Properties¶
$message
¶
Message.php
:
25
Message string. Might use replacements like %foo%, which are replaced by the values specified in the `$values` array.
|
|
$values
¶
Message.php
:
35
Translation value objects. May not contain any numbers, which might result in requiring plural forms. Use `Plural` class for that.
|
|
Tags
Methods¶
__construct()
¶
Message.php
:
42
Construct a singular only message from string and optional value array.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$message | string | - | - |
$values | array<string, scalar|null> | [] | - |
__toString()
¶
Message.php
:
50
|
|
Return values
string
Attributes
- #[Override]
getProperties()
¶
ValueObject.php
:
53
Returns list of available properties' names.
|
|
Override to add dynamic properties.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$dynamicProperties | array<int, string> | [] |
Additional dynamic properties exposed on the object |
Return values
array<int, string>
Attributes
- #[Ignore]