PhpBotFramework  1.1.1
A framework for Telegram Bots' APIs.
Public Member Functions | Protected Attributes | List of all members
DanySpin97\PhpBotFramework\InlineKeyboard Class Reference

Inline Keyboard handler that create and handle inline keyboard buttons. More...

Public Member Functions

 __construct (CoreBot &$bot=null, array $buttons=array())
 Create an inline keyboard object. More...
 
 get ($clear_keyboard=true)
 Get a JSON-serialized object containg the inline keyboard. More...
 
 getArray ($clean_keyboard=true)
 Get the array containing the buttons. (Use this method when adding keyboard to inline query results) More...
 
 addLevelButtons (array ... $buttons)
 Add buttons for the current row of buttons. More...
 
 clearKeyboard ()
 Remove all the buttons from the current inline keyboard.
 
 getBackButton ($json_serialized=true)
 Get a simple Back button with back as callback_data. More...
 
 getBackSkipKeyboard ($json_serialized=true)
 Get a Back and a Skip buttons inthe same row. More...
 
 getChooseLanguageKeyboard ($json_serialized=true)
 Get button for each language. More...
 
 initilizeCompositeListKeyboard ($index, $list, $prefix)
 

Protected Attributes

 $inline_keyboard
 Store the array of InlineKeyboardButton.
 
 $bot
 Store a reference to the bot that is using this inline keyboard.
 

Detailed Description

Inline Keyboard handler that create and handle inline keyboard buttons.

It stores the inline keyboard buttons added until get() is called. It also provides some basic button to get, like Menu and Back buttons plus the dynamic-keyboard for menu browsing.


The documentation for this class was generated from the following file: