src/PhoneNumberToCarrierMapper.php
public function getNameForValidNumber(PhoneNumber $number, $languageCode)
    {
        $languageStr = Locale::getPrimaryLanguage($languageCode);
        $scriptStr = '';
        $regionStr = Locale::getRegion($languageCode);

        return $this->prefixFileReader->getDescriptionForNumber($number, $languageStr, $scriptStr, $regionStr);
    }
public function getNameForValidNumber(PhoneNumber $number, $languageCode)
    {
        $languageStr = Locale::getPrimaryLanguage($languageCode);
        $scriptStr = '';
        $regionStr = Locale::getRegion($languageCode);

        return $this->prefixFileReader->getDescriptionForNumber($number, $languageStr, $scriptStr, $regionStr);
    }
public function getNameForValidNumber ( PhoneNumber $ number , $ languageCode ) { $ languageStr = Locale :: getPrimaryLanguage ( $ languageCode ) ; $ scriptStr = '' ; $ regionStr = Locale :: getRegion ( $ languageCode ) ; return $ this -> prefixFileReader -> getDescriptionForNumber ( $ number , $ languageStr , $ scriptStr , $ regionStr ) ; }
Returns a carrier name for the given phone number, in the language provided. The carrier name
is the one the number was originally allocated to, however if the country supports mobile
number portability the number might not belong to the returned carrier anymore. If no mapping
is found an empty string is returned.

<p>This method assumes the validity of the number passed in has already been checked, and that
the number is suitable for carrier lookup. We consider mobile and pager numbers possible
candidates for carrier lookup.

@param PhoneNumber $number a valid phone number for which we want to get a carrier name
@param string $languageCode the language code in which the name should be written
@return string a carrier name for the given phone number
Returns a carrier name for the given phone number in the language provided . The carrier name is the one the number was originally allocated to however if the country supports mobile number portability the number might not belong to the returned carrier anymore . If no mapping is found an empty string is returned .