Copied!

Message

Message.php : 17
Extends Translation

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

protected $message

Message.php : 23

Message string. Might use replacements like %foo%, which are replaced by the values specified in the values array.

protected string $message

protected $values

Message.php : 31

Translation value objects. May not contain any numbers, which might result in requiring plural forms. Use Plural for that.

protected array<string, scalar> $values

Methods

public__construct()

Message.php : 38

Construct singular only message from string and optional value array.

public __construct(string $message[, array<string, scalar> $values = [] ])

Parameters

Name Type Default value Description
$message string - -
$values array<string, scalar> [] -

public__toString()

Message.php : 46
public __toString() : mixed

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

protected getProperties([array<string|int, mixed> $dynamicProperties = [] ]) : array<string|int, mixed>

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>