tentwofour / intl
Provides extra helpers for Symfony's Intl RegionBundle
Installs: 167
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tentwofour/intl
Requires
- php: ^7.0
Requires (Dev)
- phpunit/phpunit: ^6.0
This package is auto-updated.
Last update: 2025-10-25 08:34:21 UTC
README
Just a few helpers, good for use when dealing with Canadian and USA provinces/states, forms, and persistence.
$provinces = CountryHelper::getCanadianProvinces();
Returns:
[ 'AB' => 'Alberta', 'BC' => 'British Columbia', 'MB' => 'Manitoba', 'NB' => 'New Brunswick', 'NL' => 'Newfoundland and Labrador', 'NS' => 'Nova Scotia', 'NU' => 'Nunavut', 'NT' => 'Northwest Territories', 'ON' => 'Ontario', 'PE' => 'Prince Edward Island', 'QC' => 'Quebec', 'SK' => 'Saskatchewan', 'YT' => 'Yukon' ];
$provinces = CountryHelper::getCanadianProvinceAbbreviations();
Returns:
[
0 => 'AB',
1 => 'BC',
2 => 'MB',
3 => 'NB',
4 => 'NL',
5 => 'NS',
6 => 'NU',
7 => 'NT',
8 => 'ON',
9 => 'PE',
10 => 'QC',
11 => 'SK',
12 => 'YT'
];
The USA helper methods behave in the same manner.