/**
  * Checks whether the given class is supported for denormalization by this normalizer.
  *
  * @param mixed $data Data to denormalize from.
  * @param string $type The class to which the data should be denormalized.
  * @param string $format The format being deserialized from.
  *
  * @return bool
  */
 public function supportsDenormalization($data, $type, $format = null)
 {
     if ($format == "xml" && $type == PaymentRequest::GetClassName()) {
         return true;
     }
     return false;
 }
 private static function getClassName($xml, MessageType $messageType)
 {
     switch ($messageType) {
         case MessageType::PAYMENT:
             if (self::IsRequest($xml)) {
                 return PaymentRequest::GetClassName();
             }
             return PaymentResponse::GetClassName();
         case MessageType::THREE_D_SECURE:
             if (self::IsRequest($xml)) {
                 return ThreeDSecureRequest::GetClassName();
             }
             return ThreeDSecureResponse::GetClassName();
     }
 }