@@ 29-47 (lines=19) @@ | ||
26 | /** \class ChosenInlineResult |
|
27 | * \brief Represents a result of an inline query that was chosen by the user and sent to their chat partner. |
|
28 | */ |
|
29 | class ChosenInlineResult implements \ArrayAccess |
|
30 | { |
|
31 | ||
32 | /** @} */ |
|
33 | ||
34 | use EntityAccess; |
|
35 | ||
36 | public function getQuery() : string |
|
37 | { |
|
38 | ||
39 | // Get text of the message if any |
|
40 | return isset($this->container['query']) ? $this->container['query'] : null; |
|
41 | } |
|
42 | ||
43 | public function getChatID() |
|
44 | { |
|
45 | ||
46 | // Return the chat id |
|
47 | return $this->container['from']['id']; |
|
48 | } |
|
49 | } |
|
50 |
@@ 29-51 (lines=23) @@ | ||
26 | /** \class Message |
|
27 | * \brief This object represents a message. |
|
28 | */ |
|
29 | class Message implements \ArrayAccess |
|
30 | { |
|
31 | /** @} */ |
|
32 | ||
33 | use EntityAccess; |
|
34 | ||
35 | public function getText() : string |
|
36 | { |
|
37 | // Get text of the message if any |
|
38 | return isset($this->container['text']) ? $this->container['text'] : null; |
|
39 | } |
|
40 | ||
41 | public function getChatID() |
|
42 | { |
|
43 | // Return the chat id |
|
44 | return $this->container['chat']['id']; |
|
45 | } |
|
46 | ||
47 | public function getMessageId() : int |
|
48 | { |
|
49 | return $this->container['message_id']; |
|
50 | } |
|
51 | } |
|
52 |