PostableMessage
in package
Table of Contents
Properties
- $attachments : array<string|int, Attachment>
- $content : string|Card|Template
- $files : array<string|int, FileUpload>
- $metadata : array<string|int, mixed>|null
- $replyToMessageId : string|null
Methods
- __construct() : mixed
- card() : self
- getTextContent() : string
- isCard() : bool
- isTemplate() : bool
- markdown() : self
- template() : self
- text() : self
- toArray() : array{id: string, role: string, text: string, attachments: array, card?: array|null}
- Serialize for the web adapter JSON response format.
Properties
$attachments read-only
public
array<string|int, Attachment>
$attachments
$content read-only
public
string|Card|Template
$content
$files read-only
public
array<string|int, FileUpload>
$files
$metadata read-only
public
array<string|int, mixed>|null
$metadata
= null
$replyToMessageId read-only
public
string|null
$replyToMessageId
= null
Methods
__construct()
public
__construct(string|Card|Template $content[, string|null $replyToMessageId = null ][, array<string|int, mixed> $attachments = [] ][, array<string|int, mixed> $files = [] ][, array<string|int, mixed>|null $metadata = null ]) : mixed
Parameters
card()
public
static card(Card $card) : self
Parameters
- $card : Card
Return values
selfgetTextContent()
public
getTextContent() : string
Return values
stringisCard()
public
isCard() : bool
Return values
boolisTemplate()
public
isTemplate() : bool
Return values
boolmarkdown()
public
static markdown(string $markdown) : self
Parameters
- $markdown : string
Return values
selftemplate()
public
static template(Template $template) : self
Parameters
- $template : Template
Return values
selftext()
public
static text(string $text) : self
Parameters
- $text : string
Return values
selftoArray()
Serialize for the web adapter JSON response format.
public
toArray(string $messageId, string $conversationId) : array{id: string, role: string, text: string, attachments: array, card?: array|null}
Parameters
- $messageId : string
- $conversationId : string