public function get(bool $clear_keyboard = true) : string
    {
        if (empty($this->inline_keyboard)) {
            throw new BotException("Inline keyboard is empty");
        }

        // Create a new array to put our buttons
        $reply_markup = ['inline_keyboard' => $this->inline_keyboard];
        $reply_markup = json_encode($reply_markup);

        if ($clear_keyboard) {
            $this->clearKeyboard();
        }

        return $reply_markup;
    }
public function get(bool $clear_keyboard = true) : string
    {
        if (empty($this->inline_keyboard)) {
            throw new BotException("Inline keyboard is empty");
        }

        // Create a new array to put our buttons
        $reply_markup = ['inline_keyboard' => $this->inline_keyboard];
        $reply_markup = json_encode($reply_markup);

        if ($clear_keyboard) {
            $this->clearKeyboard();
        }

        return $reply_markup;
    }
public function get ( bool $ clear_keyboard = true ) : string { if ( empty ( $ this -> inline_keyboard ) ) { throw new BotException ( "Inline keyboard is empty" ) ; } // Create a new array to put our buttons $ reply_markup = [ 'inline_keyboard' => $ this -> inline_keyboard ] ; $ reply_markup = json_encode ( $ reply_markup ) ; if ( $ clear_keyboard ) { $ this -> clearKeyboard ( ) ; } return $ reply_markup ; }
\brief Get a JSON object containing the inline keyboard.
@param bool $clear_keyboard Remove all the buttons from this object.
@return string JSON object.
\ brief Get a JSON object containing the inline keyboard .