Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
libphonenumber\MultiFileMetadataSourceImpl Class Reference
Inheritance diagram for libphonenumber\MultiFileMetadataSourceImpl:
libphonenumber\MetadataSourceInterface

Public Member Functions

 __construct (protected MetadataLoaderInterface $metadataLoader, ?string $currentFilePrefix=null)
 
 getMetadataForNonGeographicalRegion (int $countryCallingCode)
 Gets phone metadata for a non-geographical region.
 
 getMetadataForRegion (string $regionCode)
 
 loadMetadataFromFile (string $filePrefix, string $regionCode, int $countryCallingCode, MetadataLoaderInterface $metadataLoader)
 

Protected Attributes

PhoneMetadata[] array $countryCodeToNonGeographicalMetadataMap = []
 A mapping from a country calling code for a non-geographical entity to the PhoneMetadata for that country calling code.
 
string $currentFilePrefix
 The prefix of the metadata files from which region data is loaded.
 
PhoneMetadata[] array $regionToMetadataMap = []
 A mapping from a region code to the PhoneMetadata for that region.
 

Static Protected Attributes

static string $metaDataFilePrefix = PhoneNumberUtil::META_DATA_FILE_PREFIX
 

Member Function Documentation

◆ getMetadataForNonGeographicalRegion()

libphonenumber\MultiFileMetadataSourceImpl::getMetadataForNonGeographicalRegion ( int $countryCallingCode)

Gets phone metadata for a non-geographical region.

Parameters
int$countryCallingCodethe country calling code.
Return values
PhoneMetadatathe phone metadata for that region, or null if there is none.

Implements libphonenumber\MetadataSourceInterface.

◆ getMetadataForRegion()

libphonenumber\MultiFileMetadataSourceImpl::getMetadataForRegion ( string $regionCode)

Member Data Documentation

◆ $countryCodeToNonGeographicalMetadataMap

PhoneMetadata [] array libphonenumber\MultiFileMetadataSourceImpl::$countryCodeToNonGeographicalMetadataMap = []
protected

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).


The documentation for this class was generated from the following file: