1 | <?php namespace nyx\notify\transports\slack; |
||
16 | class Response extends Message |
||
17 | { |
||
18 | /** |
||
19 | * The types a Response can be of. |
||
20 | */ |
||
21 | const TYPE_CHANNEL = 'in_channel'; |
||
22 | const TYPE_EPHEMERAL = 'ephemeral'; |
||
23 | |||
24 | /** |
||
25 | * @var string The type of the Response. One of the TYPE_* class constants. |
||
26 | */ |
||
27 | protected $type; |
||
28 | |||
29 | /** |
||
30 | * @var bool Whether the original Message should be replaced by this Response. When false, this Response |
||
31 | * will be considered a brand new Message. |
||
32 | */ |
||
33 | protected $replaceOriginal; |
||
34 | |||
35 | /** |
||
36 | * @var bool Whether the original Message should be deleted. If a new one is sent along this Response, |
||
37 | * it will be published as a brand new Message. |
||
38 | */ |
||
39 | protected $deleteOriginal; |
||
40 | |||
41 | /** |
||
42 | * Returns the type of the Response. |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getType() |
||
50 | |||
51 | /** |
||
52 | * Sets the type of the Response. |
||
53 | * |
||
54 | * @param string $type |
||
55 | * @return $this |
||
56 | * @throws \InvalidArgumentException |
||
57 | */ |
||
58 | public function setType(string $type) : Response |
||
68 | |||
69 | /** |
||
70 | * Checks whether the original Message should be replaced by this Response. |
||
71 | * |
||
72 | * @return bool |
||
73 | */ |
||
74 | public function shouldReplaceOriginal() : bool |
||
78 | |||
79 | /** |
||
80 | * Sets whether the original Message should be replaced by this Response. |
||
81 | * |
||
82 | * @param bool $replace |
||
83 | * @return $this |
||
84 | */ |
||
85 | public function setReplaceOriginal(bool $replace) : Response |
||
91 | |||
92 | /** |
||
93 | * Checks whether the original Message should be deleted. |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function shouldDeleteOriginal() : bool |
||
101 | |||
102 | /** |
||
103 | * Sets whether the original Message should be deleted. |
||
104 | * |
||
105 | * @param bool $delete |
||
106 | * @return $this |
||
107 | */ |
||
108 | public function setDeleteOriginal(bool $delete) : Response |
||
114 | } |
||
115 |