1 | <?php |
||
5 | class SlackAttachment |
||
6 | { |
||
7 | /** |
||
8 | * The attachment's title. |
||
9 | * |
||
10 | * @var string |
||
11 | */ |
||
12 | public $title; |
||
13 | |||
14 | /** |
||
15 | * The attachment's URL. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | public $url; |
||
20 | |||
21 | /** |
||
22 | * The attachment's text content. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | public $content; |
||
27 | |||
28 | /** |
||
29 | * The attachment's fields. |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | public $fields; |
||
34 | |||
35 | /** |
||
36 | * Set the title of the attachment. |
||
37 | * |
||
38 | * @param string $title |
||
39 | * @param string $url |
||
40 | * @return $this |
||
41 | */ |
||
42 | 1 | public function title($title, $url = null) |
|
49 | |||
50 | /** |
||
51 | * Set the content (text) of the attachment. |
||
52 | * |
||
53 | * @param string $content |
||
54 | * @return $this |
||
55 | */ |
||
56 | 1 | public function content($content) |
|
62 | |||
63 | /** |
||
64 | * Set the fields of the attachment. |
||
65 | * |
||
66 | * @param array $fields |
||
67 | * @return $this |
||
68 | */ |
||
69 | 1 | public function fields(array $fields) |
|
75 | } |
||
76 |