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
파일 보기 프로젝트 열기: irazasyed/telegram-bot-sdk 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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