Alcohol\ISO3166\ISO3166::getByNumeric PHP Method

getByNumeric() public method

Lookup ISO3166-1 data by numeric identifier (numerical string, that is).
public getByNumeric ( string $numeric ) : array
$numeric string
return array
    public function getByNumeric($numeric)
    {
        if (!preg_match('/^[0-9]{3}$/', $numeric)) {
            throw new \DomainException('Not a valid numeric: ' . $numeric);
        }
        return $this->get($numeric);
    }