Alcohol\ISO3166\ISO3166::get PHP Method

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
    protected function get($id)
    {
        foreach ($this as $country) {
            if (0 === strcasecmp($id, $country[self::KEY_ALPHA2]) || 0 === strcasecmp($id, $country[self::KEY_ALPHA3]) || 0 === strcasecmp($id, $country[self::KEY_NUMERIC])) {
                return $country;
            }
        }
        throw new \OutOfBoundsException('ISO 3166-1 does not contain: ' . $id);
    }