Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F626027
InlineQuery.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
InlineQuery.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
\
Entities
\
InlineQuery
\
InlineQueryResult
;
use
Longman
\
TelegramBot
\
Request
;
/**
* Class InlineQuery
*
* @link https://core.telegram.org/bots/api#inlinequery
*
* @method string getId() Unique identifier for this query
* @method User getFrom() Sender
* @method Location getLocation() Optional. Sender location, only for bots that request user location
* @method string getQuery() Text of the query (up to 512 characters)
* @method string getOffset() Offset of the results to be returned, can be controlled by the bot
*/
class
InlineQuery
extends
Entity
{
/**
* {@inheritdoc}
*/
protected
function
subEntities
(
)
:
array
{
return
[
'from'
=>
User
::
class
,
'location'
=>
Location
::
class
,
]
;
}
/**
* Answer this inline query with the passed results.
*
* @param InlineQueryResult[] $results
* @param array $data
*
* @return ServerResponse
*/
public
function
answer
(
array
$results
,
array
$data
=
[
]
)
:
ServerResponse
{
return
Request
::
answerInlineQuery
(
array_merge
(
[
'inline_query_id'
=>
$this
->
getId
(
)
,
'results'
=>
$results
,
]
,
$data
)
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 15, 12:13 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
130982
Default Alt Text
InlineQuery.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline