2017 © Pedro Peláez
 

library country

A PHP library for country and subdivision data.

image

phine/country

A PHP library for country and subdivision data.

  • Tuesday, April 21, 2015
  • by kherge
  • Repository
  • 1 Watchers
  • 51 Stars
  • 147,290 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 4 Forks
  • 5 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

Country

Build Status Coverage Status Latest Stable Version Total Downloads, (*1)

A PHP library for country and subdivision data., (*2)

Usage

use Phine\Country\Loader\Loader;

$loader = new Loader();

// returns data for "US"
$country = $loader->loadCountry('US');

echo $country->getAlpha2Code(); // "US"
echo $country->getAlpha3Code(); // "USA"
echo $country->getLongName(); // "United States of America"
echo $country->getNumericCode(); // "840"
echo $country->getShortName(); // "United States"

// returns all countries
$countries = $loader->loadCountries();

$country = $countries['US'];

// returns data for "US-CA"
$subdivision = $loader->loadSubdivision('US-CA');

echo $subdivision->getCode(); // "US-CA"
echo $subdivision->getName(); // "California"

// returns all subdivisions
$subdivisions = $loader->loadSubdivisions();

$subdivision = $subdivisions['US-CA'];

// returns all subdivisions for a specific country
$subdivisions = $loader->loadSubdivisions('US');

Requirement

Installation

Via Composer:, (*3)

$ composer require "phine/country=~1.0"

Documentation

You can find the documentation in the docs/ directory., (*4)

License

This library is available under the MIT license., (*5)

The Versions

21/04 2015

dev-master

9999999-dev https://github.com/phine/lib-country

A PHP library for country and subdivision data.

  Sources   Download

MIT

The Requires

 

The Development Requires

country countries

21/04 2015

1.1.0

1.1.0.0 https://github.com/phine/lib-country

A PHP library for country and subdivision data.

  Sources   Download

MIT

The Requires

 

The Development Requires

country countries

01/11 2013

1.0.0

1.0.0.0 https://github.com/phine/lib-country

A PHP library for country and subdivision data.

  Sources   Download

MIT

The Requires

 

The Development Requires

country countries