1 | <?php |
||
13 | class Session implements Arrayable |
||
14 | { |
||
15 | private $channel; |
||
16 | private $chat; |
||
17 | private $user; |
||
18 | private $message; |
||
19 | private $intent; |
||
20 | private $interaction; |
||
21 | |||
22 | 8 | public function __construct( |
|
37 | |||
38 | /** |
||
39 | * Get channel name. |
||
40 | * |
||
41 | * @return Channel |
||
42 | */ |
||
43 | 1 | public function getChannel(): Channel |
|
47 | |||
48 | /** |
||
49 | * Get chat. |
||
50 | * |
||
51 | * @return Chat |
||
52 | */ |
||
53 | 1 | public function getChat(): Chat |
|
57 | |||
58 | /** |
||
59 | * Get user. |
||
60 | * |
||
61 | * @return User |
||
62 | */ |
||
63 | 1 | public function getUser(): User |
|
67 | |||
68 | /** |
||
69 | * Get message received from user. |
||
70 | * |
||
71 | * @return ReceivedMessage |
||
72 | */ |
||
73 | 1 | public function getMessage(): ReceivedMessage |
|
77 | |||
78 | /** |
||
79 | * Get current intent. |
||
80 | * |
||
81 | * @return Intent|Conversable|null |
||
82 | */ |
||
83 | 1 | public function getIntent(): ?Intent |
|
87 | |||
88 | /** |
||
89 | * Set intent. |
||
90 | * |
||
91 | * @param Intent $intent |
||
92 | */ |
||
93 | 1 | public function setIntent(Intent $intent): void |
|
97 | |||
98 | /** |
||
99 | * Get interaction. |
||
100 | * |
||
101 | * @return Interaction|Conversable|null |
||
102 | */ |
||
103 | 1 | public function getInteraction(): ?Interaction |
|
107 | |||
108 | /** |
||
109 | * Set interaction. |
||
110 | * |
||
111 | * @param Interaction|null $interaction |
||
112 | */ |
||
113 | 1 | public function setInteraction(?Interaction $interaction): void |
|
117 | |||
118 | /** |
||
119 | * Get the instance as an array. |
||
120 | * |
||
121 | * @return array |
||
122 | */ |
||
123 | 1 | public function toArray(): array |
|
130 | } |
||
131 |