Closed linuxd3v closed 9 years ago
How is one supposed to use it? Do I just include php file with countries manually? Is there any kind of public access class?
This is certainly not a correct way?:
$countriesFile = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'umpirsky' . DIRECTORY_SEPARATOR . 'country-list' . DIRECTORY_SEPARATOR . 'country' . DIRECTORY_SEPARATOR . 'cldr' . DIRECTORY_SEPARATOR . 'en_US' . DIRECTORY_SEPARATOR . 'country.php'); $countries = include($countriesFile);
You can install it via composer or do it like in https://github.com/umpirsky/country-list/blob/master/src/Umpirsky/Country/Importer/Source/Icu.php in your code if you already want to do it programatically.
How is one supposed to use it?
Do I just include php file with countries manually? Is there any kind of public access class?
This is certainly not a correct way?: