Download the PHP package arslanimamutdinov/iso-standard-3166 without Composer
On this page you can find all versions of the php package arslanimamutdinov/iso-standard-3166. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package iso-standard-3166
ISO 3166-1 standard utilities
This component provides features for ISO 3166-1 standard - get country codes according to standard.
Installation
Terms and designations
- alpha2 - two-letter country code (recommended as the general-purpose code) e.g. RU;
- alpha3 - three-letter country code e.g. RUS;
- numericCodes - numeric country code e.g. 643;
- name - string country name e.g. Russian Federation.
Component parts description
Country - ISO 3166-1 standard model, contains properties:
- name - country name;
- alpha2 - country alpha2 code;
- alpha3 - country alpha3 code;
- numericCode - country numeric code.
ISO3166 - class provides set of function for working with ISO 3166-1 standard.
ISO3166Utility - service class wrapper over ISO3166 (need instantiate class object).
Country
Model for representing single country ISO 3166-1 standard.
getName
Return: ISO 3166-1 country name.
Examples
getAlpha2
Return: ISO 3166-1 country alpha2 code.
Examples
getAlpha3
Return: ISO 3166-1 country alpha3 code.
Examples
getNumericCode
Return: ISO 3166-1 country numeric code.
Examples
ISO3166 and ISO3166Utility
getAll
Return: all ISO 3166-1 country standards representing by array of Country instances.
Examples
getAllByAlpha2Codes
Input:
- $alpha2Codes - country alpha2 codes (strings array);
Return: all ISO 3166-1 country standards representing by array of Country instances searched by given alpha2 codes, empty array if non found.
Examples
getAllByAlpha3Codes
Input:
- $alpha3Codes - country alpha3 codes (strings array);
Return: all ISO 3166-1 country standards representing by array of Country instances searched by given alpha3 codes, empty array if non found.
Examples
getAllByNumericCodes
Input:
- $numericCodes - country numeric codes (strings array);
Return: all ISO 3166-1 country standards representing by array of Country instances searched by given numeric codes, empty array if non found.
Examples
getAllByNames
Input:
- $names - country names (strings array);
Return: all ISO 3166-1 country standards representing by array of Country instances searched by given names, empty array if non found.
Examples
getRawStandardsData
Return: all ISO 3166-1 country standards representing by raw array.
Examples
getByAlpha2
Input:
- $alpha2 - country alpha2 code (string);
Return: ISO 3166-1 country standards representing by instance of Country searched by given alpha2 code, null if non found.
Examples
getByAlpha3
Input:
- $alpha3 - country alpha3 code (string);
Return: ISO 3166-1 country standards representing by instance of Country searched by given alpha3 code, null if non found.
Examples
getByNumericCode
Input:
- $numericCode - country numeric code (string);
Return: ISO 3166-1 country standards representing by instance of Country searched by given numeric code, null if non found.
Examples
Country functions
Alpha2 named country functions for getting country standard by single call.
Return: ISO 3166-1 country standards representing by instance of Country.
Contributing
Welcome to pull requests. If there is a major changes, first please open an issue for discussion.
Please make sure to update tests as appropriate.
Code coverage information
Coverage information locates on top of README file.
Source(s)
- ISO 3166-1 by Wikipedia licensed under CC BY-SA 3.0 Unported License
- www.iso.org