libphonenumber\ShortNumberInfo::regionDialingFromMatchesNumber PHP 메소드

regionDialingFromMatchesNumber() 보호된 메소드

Helper method to check that the country calling code of the number matches the region it's being dialed from.
protected regionDialingFromMatchesNumber ( PhoneNumber $number, string $regionDialingFrom ) : boolean
$number PhoneNumber
$regionDialingFrom string
리턴 boolean
    protected function regionDialingFromMatchesNumber(PhoneNumber $number, $regionDialingFrom)
    {
        $regionCodes = $this->getRegionCodesForCountryCode($number->getCountryCode());
        return in_array($regionDialingFrom, $regionCodes);
    }