WhatsAppCards
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
CALLBACK_DATA_PREFIX
private
mixed
CALLBACK_DATA_PREFIX
= 'chat:'
private
mixed
MAX_BUTTON_TITLE_LENGTH
= 20
private
mixed
MAX_REPLY_BUTTONS
= 3
cardToText()
public
static cardToText(Card $card) : string
Parameters
-
$card
: Card
-
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
-
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
-
markdownToWhatsApp()
private
static markdownToWhatsApp(string $markdown) : string
Parameters
-
$markdown
: string
-
renderTableAsText()
private
static renderTableAsText(Table $table) : string
Parameters
-
$table
: Table
-