trait CreatesPotentiallyTranslatedStrings

Properties

protected Closure $destructor

The callback to call when the object destructs.

Methods

pendingPotentiallyTranslatedString(string $attribute, string|null $message)

Create a pending potentially translated string.

__construct(string $message, Translator $translator, Closure $destructor)

Create a new pending potentially translated string.

__destruct()

Handle the object's destruction.

Details

at line 15
protected PotentiallyTranslatedString pendingPotentiallyTranslatedString(string $attribute, string|null $message)

Create a pending potentially translated string.

Parameters

string $attribute
string|null $message

Return Value

PotentiallyTranslatedString

at line 30
__construct(string $message, Translator $translator, Closure $destructor)

Create a new pending potentially translated string.

Parameters

string $message
Translator $translator
Closure $destructor

at line 40
__destruct()

Handle the object's destruction.