PHP Класс Telegram\Bot\Keyboard\Keyboard

For Standard Keyboard $params = [ 'keyboard' => '', 'resize_keyboard' => '', 'one_time_keyboard' => '', 'selective' => '', ]; OR For Inline Keyboard $params = [ 'inline_keyboard' => '', ];
Наследование: extends Base
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$inline boolean Make an Inline Keyboard

Открытые методы

Метод Описание
button ( string | array $params = [] ) : mixed Represents one button of the Reply keyboard.
forceReply ( array $params = [] ) : string Display a reply interface to the user (act as if the user has selected the bot‘s message and tapped ’Reply').
hide ( array $params = [] ) : string Hide the current custom keyboard and display the default letter-keyboard.
inline ( ) Make this keyboard inline, So it appears right next to the message it belongs to.
inlineButton ( string | array $params = [] ) : string Represents one button of an inline keyboard.
isInlineKeyboard ( ) : boolean Determine if it's an inline keyboard.
row ( ) Create a new row in keyboard to add buttons.

Описание методов

button() публичный статический Метод

For simple text buttons String can be used instead of an array. You can also utilise the fluent API to build the params payload. $params = 'string' OR $params = [ 'text' => '', 'request_contact' => '', 'request_location' => '', ];
public static button ( string | array $params = [] ) : mixed
$params string | array
Результат mixed

forceReply() публичный статический Метод

$params = [ 'force_reply' => true, 'selective' => false, ];
public static forceReply ( array $params = [] ) : string
$params array
Результат string

hide() публичный статический Метод

$params = [ 'hide_keyboard' => true, 'selective' => false, ];
public static hide ( array $params = [] ) : string
$params array
Результат string

inline() публичный Метод

Make this keyboard inline, So it appears right next to the message it belongs to.
public inline ( )

inlineButton() публичный статический Метод

You must use exactly one of the optional fields. You can also utilise the fluent API to build the params payload. $params = [ 'text' => '', 'url' => '', 'callback_data' => '', 'switch_inline_query' => '', ];
public static inlineButton ( string | array $params = [] ) : string
$params string | array
Результат string

isInlineKeyboard() публичный Метод

Determine if it's an inline keyboard.
public isInlineKeyboard ( ) : boolean
Результат boolean

row() публичный Метод

Create a new row in keyboard to add buttons.
public row ( )

Описание свойств

$inline защищенное свойство

Make an Inline Keyboard
protected bool $inline
Результат boolean