예제 #1
0
 /**
  * @param PhoneMetadata $metadata
  * @param int $type PhoneNumberType
  * @return PhoneNumberDesc
  */
 private function getNumberDescByType(PhoneMetadata $metadata, $type)
 {
     switch ($type) {
         case PhoneNumberType::PREMIUM_RATE:
             return $metadata->getPremiumRate();
         case PhoneNumberType::TOLL_FREE:
             return $metadata->getTollFree();
         case PhoneNumberType::MOBILE:
             return $metadata->getMobile();
         case PhoneNumberType::FIXED_LINE:
         case PhoneNumberType::FIXED_LINE_OR_MOBILE:
             return $metadata->getFixedLine();
         case PhoneNumberType::SHARED_COST:
             return $metadata->getSharedCost();
         case PhoneNumberType::VOIP:
             return $metadata->getVoip();
         case PhoneNumberType::PERSONAL_NUMBER:
             return $metadata->getPersonalNumber();
         case PhoneNumberType::PAGER:
             return $metadata->getPager();
         case PhoneNumberType::UAN:
             return $metadata->getUan();
         case PhoneNumberType::VOICEMAIL:
             return $metadata->getVoicemail();
         default:
             return $metadata->getGeneralDesc();
     }
 }