Ecma\Intl\SupportedLocales\Options
- class Ecma\Intl\SupportedLocales\Options
Options to use when evaluating supported locales.
ECMA-402 defines a
supportedLocalesOf()
static method that is available on many of the classes provided in the specification. For example, see Intl.Collator.supportedLocalesOf. Each of these methods accepts anoptions
object that specifies the locale matcher algorithm to use when evaluating supported locales. In this PHP implementation,Ecma\Intl\SupportedLocales\Options
provides a type for this options object.- property localeMatcher string | null, readonly
The locale-matching algorithm to use when evaluating supported locales.
- __construct([$localeMatcher = null])
- Parameters:
$localeMatcher (
Stringable | string | null
) – The locale-matching algorithm to use when evaluating supported locales. This may be one of the values"best fit"
or"lookup"
. Other implementations may define additional values.
- jsonSerialize() object
Returns an object of these options, suitable for serializing to JSON.
Please note that any options with a
null
value will not be included in the object this method returns. This allows the JSON to be passed to JavaScript contexts, where these properties are consideredundefined
.
- current() string | bool
- next() void
- key() string
- valid() bool
- rewind() void