bootdesk/chat-sdk

WhatsAppCards
in package

Table of Contents

Constants

CALLBACK_DATA_PREFIX  : mixed = 'chat:'
MAX_BUTTON_TITLE_LENGTH  : mixed = 20
MAX_REPLY_BUTTONS  : mixed = 3

Methods

cardToText()  : string
decodeCallbackData()  : array<string|int, mixed>
encodeCallbackData()  : string
toInteractiveMessage()  : array<string|int, mixed>|null
buildBodyText()  : string
markdownToWhatsApp()  : string
renderTableAsText()  : string

Constants

CALLBACK_DATA_PREFIX

private mixed CALLBACK_DATA_PREFIX = 'chat:'

MAX_BUTTON_TITLE_LENGTH

private mixed MAX_BUTTON_TITLE_LENGTH = 20

Methods

cardToText()

public static cardToText(Card $card) : string
Parameters
$card : Card
Return values
string

decodeCallbackData()

public static decodeCallbackData(string|null $data) : array<string|int, mixed>
Parameters
$data : string|null
Return values
array<string|int, mixed>

encodeCallbackData()

public static encodeCallbackData(string $actionId[, string|null $value = null ]) : string
Parameters
$actionId : string
$value : string|null = null
Return values
string

toInteractiveMessage()

public static toInteractiveMessage(Card $card) : array<string|int, mixed>|null
Parameters
$card : Card
Return values
array<string|int, mixed>|null

buildBodyText()

private static buildBodyText(Card $card) : string
Parameters
$card : Card
Return values
string

markdownToWhatsApp()

private static markdownToWhatsApp(string $markdown) : string
Parameters
$markdown : string
Return values
string

renderTableAsText()

private static renderTableAsText(Table $table) : string
Parameters
$table : Table
Return values
string
On this page

Search results