PHP Class Alcohol\ISO3166\ISO3166

Inheritance: implements IteratorAggregate, implements Alcohol\ISO3166\DataProvider
显示文件 Open project: alcohol/iso3166

Protected Properties

Property Type Description
$countries array

Public Methods

Method Description
getAll ( ) : array
getByAlpha2 ( string $alpha2 ) : array Lookup ISO3166-1 data by alpha2 identifier.
getByAlpha3 ( string $alpha3 ) : array Lookup ISO3166-1 data by alpha3 identifier.
getByCode ( string $code ) : array
getByNumeric ( string $numeric ) : array Lookup ISO3166-1 data by numeric identifier (numerical string, that is).
getIterator ( ) : Generator
listBy ( string $listBy = self::KEY_ALPHA2 ) : Generator

Protected Methods

Method Description
get ( string $id ) : array Lookup ISO3166-1 data by given identifier.

Method Details

get() protected method

Looks for a match against all known identifying keys of each entry in the dataset.
protected get ( string $id ) : array
$id string
return array

getAll() public method

public getAll ( ) : array
return array

getByAlpha2() public method

Lookup ISO3166-1 data by alpha2 identifier.
public getByAlpha2 ( string $alpha2 ) : array
$alpha2 string
return array

getByAlpha3() public method

Lookup ISO3166-1 data by alpha3 identifier.
public getByAlpha3 ( string $alpha3 ) : array
$alpha3 string
return array

getByCode() public method

Deprecation:
public getByCode ( string $code ) : array
$code string
return array

getByNumeric() public method

Lookup ISO3166-1 data by numeric identifier (numerical string, that is).
public getByNumeric ( string $numeric ) : array
$numeric string
return array

getIterator() public method

public getIterator ( ) : Generator
return Generator

listBy() public method

public listBy ( string $listBy = self::KEY_ALPHA2 ) : Generator
$listBy string
return Generator

Property Details

$countries protected_oe property

protected array $countries
return array