code: public function transform($message)
      {
          if (is_array($message)) {
              $class = News::class;
          } else {
              if (is_string($message)) {
                  $message = new Text(['content' => $message]);
              }
  
              $class = get_class($message);
          }
  
          $handle = 'transform'.substr($class, strlen('EasyWeChat\Message\\'));
  
          return method_exists($this, $handle) ? $this->$handle($message) : [];
      }
docs: transform message to XML.
  
  @param array|string|AbstractMessage $message
  
  @return array