class TextObject extends PlainTextOnlyTextObject

Properties

protected string $text

The formatting to use for this text object.

from  PlainTextOnlyTextObject
protected bool|null $emoji

Indicates whether emojis in a text field should be escaped into the colon emoji format.

from  PlainTextOnlyTextObject
protected string $type

The formatting to use for this text object.

protected bool|null $verbatim

Whether to skip any preprocessing / auto-conversion of URLs, conversation names, and certain mentions.

Methods

__construct(string $text, int $maxLength = 3000, int $minLength = 1)

Create a new plain text only text object instance.

emoji()

Indicate that emojis should be escaped into the colon emoji format.

array
toArray()

Get the instance as an array.

markdown()

Changes the formatting of this text object to mrkdwn.

verbatim()

Indicate that URLs, conversation names and certain mentions should not be auto-linked.

Details

__construct(string $text, int $maxLength = 3000, int $minLength = 1)

Create a new plain text only text object instance.

Parameters

string $text
int $maxLength
int $minLength

PlainTextOnlyTextObject emoji()

Indicate that emojis should be escaped into the colon emoji format.

at line 50
array toArray()

Get the instance as an array.

Return Value

array

at line 28
TextObject markdown()

Changes the formatting of this text object to mrkdwn.

Return Value

TextObject

at line 40
TextObject verbatim()

Indicate that URLs, conversation names and certain mentions should not be auto-linked.

Only applicable for mrkdwn text objects.

Return Value

TextObject