fromArray() public method

public fromArray ( array $input ) : PhoneMetadata
$input array
return PhoneMetadata
 public function loadMetadataFromFile($filePrefix, $regionCode, $countryCallingCode)
 {
     $isNonGeoRegion = self::REGION_CODE_FOR_NON_GEO_ENTITY === $regionCode;
     $fileName = $filePrefix . '_' . ($isNonGeoRegion ? $countryCallingCode : $regionCode) . '.php';
     if (!is_readable($fileName)) {
         throw new \RuntimeException('missing metadata: ' . $fileName);
     } else {
         $data = (include $fileName);
         $metadata = new PhoneMetadata();
         $metadata->fromArray($data);
         if ($isNonGeoRegion) {
             $this->countryCodeToNonGeographicalMetadataMap[$countryCallingCode] = $metadata;
         } else {
             $this->regionToMetadataMap[$regionCode] = $metadata;
         }
     }
 }