Blame view

addons/antis/library/wework/Message/Markdown.php 617 Bytes
2db47680   hexiaodong   chore: 初始提交 php 遗...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  <?php

  

  namespace WeWork\Message;

  

  class Markdown implements \WeWork\Message\ResponseMessageInterface

  {

  

      /**

       * @var string

       */

      private $content;

  

      /**

       * Markdown constructor.

       * @param string $content

       */

      public function __construct(string $content)

      {

          $this->content = $content;

      }

  

      /**

       * @inheritDoc

       */

      public function formatForResponse(): array

      {

          return [

              'msgtype'  => 'markdown',

              'markdown' => [

                  'content' => $this->content,

              ]

          ];

      }

  }