1 | <?php |
||
12 | class Context implements Arrayable |
||
13 | { |
||
14 | private $channel; |
||
15 | private $chat; |
||
16 | private $user; |
||
17 | private $intent; |
||
18 | private $interaction; |
||
19 | private $items; |
||
20 | |||
21 | 8 | public function __construct(Channel $channel, Chat $chat, User $user, array $items = []) |
|
28 | |||
29 | 4 | public function getChannel(): Channel |
|
33 | |||
34 | 4 | public function getChat(): Chat |
|
38 | |||
39 | 4 | public function getUser(): User |
|
43 | |||
44 | 2 | public function getIntent(): ?Intent |
|
48 | |||
49 | 2 | public function setIntent(Intent $intent): Context |
|
55 | |||
56 | 2 | public function getInteraction(): ?Interaction |
|
60 | |||
61 | 2 | public function setInteraction(?Interaction $interaction): Context |
|
67 | |||
68 | 4 | public function get(string $key, $default = null) |
|
72 | |||
73 | 2 | public function set(string $key, $value): Context |
|
79 | |||
80 | 2 | public function toArray(): array |
|
88 | } |
||
89 |