PHP Class libphonenumber\prefixmapper\PhonePrefixMap

Class PhonePrefixMap
Show file Open project: giggsey/libphonenumber-for-php

Protected Properties

Property Type Description
$phonePrefixMapStorage
$phoneUtil libphonenumber\PhoneNumberUtil

Public Methods

Method Description
__construct ( $map )
lookup ( PhoneNumber $number ) : string | null Returns the description of the {@code $number}. This method distinguishes the case of an invalid prefix and a prefix for which the name is not available in the current language. If the description is not available in the current language an empty string is returned. If no description was found for the provided number, null is returned.
lookupKey ( $key )

Method Details

__construct() public method

public __construct ( $map )

lookup() public method

Returns the description of the {@code $number}. This method distinguishes the case of an invalid prefix and a prefix for which the name is not available in the current language. If the description is not available in the current language an empty string is returned. If no description was found for the provided number, null is returned.
public lookup ( PhoneNumber $number ) : string | null
$number libphonenumber\PhoneNumber The phone number to look up
return string | null the description of the number

lookupKey() public method

public lookupKey ( $key )

Property Details

$phonePrefixMapStorage protected property

protected $phonePrefixMapStorage

$phoneUtil protected property

protected PhoneNumberUtil,libphonenumber $phoneUtil
return libphonenumber\PhoneNumberUtil