* @method string getText() Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
* @method bool getRequestContact() Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
* @method bool getRequestLocation() Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
*
* @method $this setText(string $text) Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
* @method $this setRequestContact(bool $request_contact) Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
* @method $this setRequestLocation(bool $request_location) Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
*/
classKeyboardButtonextendsEntity
{
/**
* {@inheritdoc}
*/
publicfunction__construct($data)
{
if(is_string($data)){
$data=['text'=>$data];
}
parent::__construct($data);
}
/**
* Check if the passed data array could be a KeyboardButton.