libphonenumber\ShortNumberInfo::getRegionCodesForCountryCode PHP Méthode

getRegionCodesForCountryCode() protected méthode

Returns a list with teh region codes that match the specific country calling code. For non-geographical country calling codes, the region code 001 is returned. Also, in the case of no region code being found, an empty list is returned.
protected getRegionCodesForCountryCode ( integer $countryCallingCode ) : array
$countryCallingCode integer
Résultat array
    protected function getRegionCodesForCountryCode($countryCallingCode)
    {
        if (!array_key_exists($countryCallingCode, $this->countryCallingCodeToRegionCodeMap)) {
            $regionCodes = null;
        } else {
            $regionCodes = $this->countryCallingCodeToRegionCodeMap[$countryCallingCode];
        }
        return $regionCodes === null ? array() : $regionCodes;
    }