Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F619512
CallbackQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
CallbackQuery.php
View Options
<?php
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Longman
\
TelegramBot
\
Entities
;
use
Longman
\
TelegramBot
\
Http
\
Request
;
/**
* Class CallbackQuery.
*
* @link https://core.telegram.org/bots/api#callbackquery
*
* @method string getId() Unique identifier for this query
* @method User getFrom() Sender
* @method Message getMessage() Optional. Message with the callback button that originated the query. Note that message content and message date will
* not be available if the message is too old
* @method string getInlineMessageId() Optional. Identifier of the message sent via the bot in inline mode, that originated the query
* @method string getData() Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field
*/
class
CallbackQuery
extends
Entity
{
/**
* {@inheritdoc}
*/
public
function
subEntities
(
)
{
return
[
'from'
=>
User
::
class
,
'message'
=>
Message
::
class
,
]
;
}
/**
* Answer this callback query.
*
* @param array $data
*
* @return ServerResponse
*/
public
function
answer
(
array
$data
=
[
]
)
{
return
Request
::
answerCallbackQuery
(
array_merge
(
[
'callback_query_id'
=>
$this
->
getId
(
)
,
]
,
$data
)
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 14, 4:50 PM (10 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
141180
Default Alt Text
CallbackQuery.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline