Download the PHP package graftak/country-code-helper without Composer

On this page you can find all versions of the php package graftak/country-code-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package country-code-helper

Country Code Helper - Easily map ISO 3166-1 country codes

Simple package to assist you in converting/mapping ISO 3166-1 Alpha-2, Alpha-3, and Numeric Country Codes.

Installation

Install the latest version with

Usage

Include these two classes:

Then, in your code, just use the static method map:

The first parameter $value is the country code (string) you want to map from. For example:

The second parameter $toType is the type you want to map to. These types are supported:

Optionally you can supply the third parameter to explicitly define the type of the given $value (you can use any of the constants above).

Examples

About

Requirements

Country Codes - ISO 3166

What is ISO 3166? ISO 3166 is the International Standard for country codes and codes for their subdivisions.

The purpose of ISO 3166 is to define internationally recognised codes of letters and/or numbers that we can use when we refer to countries and subdivisions. However, it does not define the names of countries – this information comes from United Nations sources (Terminology Bulletin Country Names and the Country and Region Codes for Statistical Use maintained by the United Nations Statistics Divisions).

Using codes saves time and avoids errors as instead of using a country's name (which will change depending on the language being used) we can use a combination of letters and/or numbers that are understood all over the world.

For example, all national postal organizations throughout the world exchange international mail in containers identified with the relevant country code. Internet domain name systems use the codes to define top level domain names such as '.fr' for France, '.au' for Australia. In addition, in machine readable passports, the codes are used to determine the nationality of the user and when we send money from one bank to another the country codes are a way to identify where the bank is based.

Excerpt from: https://www.iso.org/iso-3166-country-codes.html

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

Author

Bert van der Genugten

License

Country Code Helper is licensed under the BSD-3-Clause License - see the LICENSE file for details

Acknowledgements

Data source: https://www.iso.org/obp/ui/#search/code/

More information about ISO 3166 can be found on the official website of ISO (International Organization for Standardization): https://www.iso.org/iso-3166-country-codes.html


All versions of country-code-helper with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package graftak/country-code-helper contains the following files

Loading the files please wait ....