NumberFormatRepository
Provides number formats.
- Full name:
\CommerceGuys\Intl\NumberFormat\NumberFormatRepository
- This class implements:
\CommerceGuys\Intl\NumberFormat\NumberFormatRepositoryInterface
Properties
fallbackLocale
The fallback locale.
Methods
__construct
Creates a NumberFormatRepository instance.
Parameters:
Parameter | Type | Description |
---|---|---|
$fallbackLocale |
string | The fallback locale. Defaults to 'en'. |
get
Gets a number format for the provided locale.
Parameters:
Parameter | Type | Description |
---|---|---|
$locale |
mixed | The locale (i.e. fr-FR). |
processDefinition
Processes the number format definition for the provided locale.
Parameters:
Parameter | Type | Description |
---|---|---|
$locale |
string | The locale. |
$definition |
array | The definition |
Return Value:
The processed definition.
getDefinitions
Gets the number format definitions.
Return Value:
The number format definitions, keyed by locale.
Automatically generated on 2025-03-18