MessageFormatter
class MessageFormatter (View source)
Methods
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Constructs a new Message Formatter
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Constructs a new Message Formatter
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Format the message
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Quick format message
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Parse input string according to pattern
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Quick parse input string
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Set the pattern used by the formatter
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Get the pattern used by the formatter
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Get the locale for which the formatter was created.
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Get the error code from last operation
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Get the error text from the last operation
Details
__construct(string $locale, string $pattern)
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Constructs a new Message Formatter
static MessageFormatter|null
create(string $locale, string $pattern)
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Constructs a new Message Formatter
string|false
format(array $values)
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Format the message
static string|false
formatMessage(string $locale, string $pattern, array $values)
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Quick format message
array|false
parse(string $string)
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Parse input string according to pattern
static array|false
parseMessage(string $locale, string $pattern, string $message)
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Quick parse input string
bool
setPattern(string $pattern)
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Set the pattern used by the formatter
string|false
getPattern()
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Get the pattern used by the formatter
string
getLocale()
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Get the locale for which the formatter was created.
int
getErrorCode()
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Get the error code from last operation
string
getErrorMessage()
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Get the error text from the last operation