src/Entities/ChosenInlineResult.php 1 location
|
@@ 5-23 (lines=19) @@
|
| 2 |
|
|
| 3 |
|
namespace PhpBotFramework\Entities; |
| 4 |
|
|
| 5 |
|
class ChosenInlineResult implements \ArrayAccess { |
| 6 |
|
|
| 7 |
|
use EntityAccess; |
| 8 |
|
|
| 9 |
|
public function getQuery() : string { |
| 10 |
|
|
| 11 |
|
// Get text of the message if any |
| 12 |
|
return isset($this->container['query']) ? $this->container['query'] : null; |
| 13 |
|
|
| 14 |
|
} |
| 15 |
|
|
| 16 |
|
public function getChatID() { |
| 17 |
|
|
| 18 |
|
// Return the chat id |
| 19 |
|
return $this->container['from']['id']; |
| 20 |
|
|
| 21 |
|
} |
| 22 |
|
|
| 23 |
|
} |
| 24 |
|
|
src/Entities/Message.php 1 location
|
@@ 5-23 (lines=19) @@
|
| 2 |
|
|
| 3 |
|
namespace PhpBotFramework\Entities; |
| 4 |
|
|
| 5 |
|
class Message implements \ArrayAccess { |
| 6 |
|
|
| 7 |
|
use EntityAccess; |
| 8 |
|
|
| 9 |
|
public function getText() : string { |
| 10 |
|
|
| 11 |
|
// Get text of the message if any |
| 12 |
|
return isset($this->container['text']) ? $this->container['text'] : null; |
| 13 |
|
|
| 14 |
|
} |
| 15 |
|
|
| 16 |
|
public function getChatID() { |
| 17 |
|
|
| 18 |
|
// Return the chat id |
| 19 |
|
return $this->container['chat']['id']; |
| 20 |
|
|
| 21 |
|
} |
| 22 |
|
|
| 23 |
|
} |
| 24 |
|
|