Download the PHP package yaovicoder/intl-region without Composer

On this page you can find all versions of the php package yaovicoder/intl-region. 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 intl-region

Ydee IntlRegion

A PHP library for filtering localized country lists by UN M49 continent or subregion codes, providing 196 sovereign countries only with comprehensive internationalization support.

Features

Installation

Via Composer

Manual Installation

  1. Clone the repository:

  2. Install dependencies:

Quick Start

Basic Usage

Symfony Integration

  1. Enable the bundle in your config/bundles.php:

  2. Configure the bundle in config/packages/ydee_intl_region.yaml:

  3. Use in your controllers:

API Reference

RegionProvider Class

Constructor

Core Methods

Get Countries by Continent

Parameters:

Returns: Array of country codes mapped to localized names

Examples:

Get Countries by Subregion

Parameters:

Examples:

Get All Available Countries

Returns: Array of all 196 sovereign country codes

Example:

Check Country Existence

Example:

Get Continent Code for Country

Parameters:

Examples:

ISO Code Conversion Methods

Available Codes Methods

Supported Codes

Continent Codes

ISO Code UN M49 Code Name
AFR 002 Africa
AMR 019 Americas
ASI 142 Asia
EUR 150 Europe
OCE 009 Oceania

Subregion Codes

UN M49 Code ISO Code Name
014 EAF Eastern Africa
015 NAF Northern Africa
017 MAF Middle Africa
018 SAF Southern Africa
011 WAF Western Africa
021 NAM Northern America
013 CAM Central America
029 CAR Caribbean
005 SAM South America
030 EAS Eastern Asia
034 SAS Southern Asia
035 SEA South-Eastern Asia
143 CAS Central Asia
145 WAS Western Asia
151 EEU Eastern Europe
154 NEU Northern Europe
039 SEU Southern Europe
155 WEU Western Europe
053 ANZ Australia and New Zealand
054 MEL Melanesia
057 MIC Micronesia
061 POL Polynesia

Country Counts

Continent Countries
Africa 54
Asia 48
Europe 45
North America 23
South America 12
Oceania 14
Total 196

CLI Usage

The library includes a Symfony console command for listing regions:

Error Handling

The library provides graceful error handling with logging:

Testing

Run the test suite:

Data Validation

The library includes validation against official UN M49 data:

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

See CHANGELOG.md for a list of changes and version history.

Data Sources


All versions of intl-region with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
psr/log Version ^3.0
symfony/intl Version ^6.0|^7.0
symfony/console Version ^6.0|^7.0
symfony/dependency-injection Version ^6.0|^7.0
symfony/config Version ^6.0|^7.0
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 yaovicoder/intl-region contains the following files

Loading the files please wait ...