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
:
23
Message string. Might use replacements like %foo%, which are replaced by the values specified in the values array.
|
|
$values¶
Message.php
:
31
Translation value objects. May not contain any numbers, which might result in requiring plural forms. Use Plural for that.
|
|
Methods¶
__construct() ¶
Message.php
:
38
Construct singular only message from string and optional value array.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$message | string | - | - |
$values | array<string, scalar> | [] | - |
__toString() ¶
Message.php
:
46
|
|
getProperties() ¶
ValueObject.php
:
50
Function where list of properties are returned.
|
|
Used by attributes(), override to add dynamic properties
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$dynamicProperties | array<string|int, mixed> | [] |
Additional dynamic properties exposed on the object |
Return values
array<string|int, mixed>