Fr3nch13/CakePHP Utilities

FormatterInterface

Formatter Interface

Table of Contents

Methods

format()  : string
Returns a string with all passed variables interpolated into the original message. Variables are interpolated using the sprintf format.

Methods

format()

Returns a string with all passed variables interpolated into the original message. Variables are interpolated using the sprintf format.

public format(string $locale, string $message, array<string|int, mixed> $tokenValues) : string
Parameters
$locale : string

The locale in which the message is presented.

$message : string

The message to be translated

$tokenValues : array<string|int, mixed>

The list of values to interpolate in the message

Return values
string

The formatted message


        
On this page

Search results