PHP Class libphonenumber\MultiFileMetadataSourceImpl

Inheritance: implements libphonenumber\MetadataSourceInterface
Show file Open project: giggsey/libphonenumber-for-php Class Usage Examples

Protected Properties

Property Type Description
$countryCodeToNonGeographicalMetadataMap PhoneMetadata[] A mapping from a country calling code for a non-geographical entity to the PhoneMetadata for that country calling code. Examples of the country calling codes include 800 (International Toll Free Service) and 808 (International Shared Cost Service).
$currentFilePrefix String The prefix of the metadata files from which region data is loaded.
$metaDataFilePrefix
$metadataLoader libphonenumber\MetadataLoaderInterface The metadata loader used to inject alternative metadata sources.
$regionToMetadataMap PhoneMetadata[] A mapping from a region code to the PhoneMetadata for that region.

Public Methods

Method Description
__construct ( libphonenumber\MetadataLoaderInterface $metadataLoader, string | null $currentFilePrefix = null )
getMetadataForNonGeographicalRegion ( $countryCallingCode )
getMetadataForRegion ( $regionCode )
loadMetadataFromFile ( string $filePrefix, string $regionCode, integer $countryCallingCode, libphonenumber\MetadataLoaderInterface $metadataLoader )

Method Details

__construct() public method

public __construct ( libphonenumber\MetadataLoaderInterface $metadataLoader, string | null $currentFilePrefix = null )
$metadataLoader libphonenumber\MetadataLoaderInterface
$currentFilePrefix string | null

getMetadataForNonGeographicalRegion() public method

public getMetadataForNonGeographicalRegion ( $countryCallingCode )

getMetadataForRegion() public method

public getMetadataForRegion ( $regionCode )

loadMetadataFromFile() public method

public loadMetadataFromFile ( string $filePrefix, string $regionCode, integer $countryCallingCode, libphonenumber\MetadataLoaderInterface $metadataLoader )
$filePrefix string
$regionCode string
$countryCallingCode integer
$metadataLoader libphonenumber\MetadataLoaderInterface

Property Details

$countryCodeToNonGeographicalMetadataMap protected property

A mapping from a country calling code for a non-geographical entity to the PhoneMetadata for that country calling code. Examples of the country calling codes include 800 (International Toll Free Service) and 808 (International Shared Cost Service).
protected PhoneMetadata[],libphonenumber $countryCodeToNonGeographicalMetadataMap
return PhoneMetadata[]

$currentFilePrefix protected property

The prefix of the metadata files from which region data is loaded.
protected String $currentFilePrefix
return String

$metaDataFilePrefix protected static property

protected static $metaDataFilePrefix

$metadataLoader protected property

The metadata loader used to inject alternative metadata sources.
protected MetadataLoaderInterface,libphonenumber $metadataLoader
return libphonenumber\MetadataLoaderInterface

$regionToMetadataMap protected property

A mapping from a region code to the PhoneMetadata for that region.
protected PhoneMetadata[],libphonenumber $regionToMetadataMap
return PhoneMetadata[]