Menu

## TextMessageBuilder
in package
implements MessageBuilder

TextMessageBuilder.php : 32

A builder class for text message.

### Interfaces, Classes and Traits

MessageBuilder
  The interface that has a responsibility to build message.

### Table of Contents

$message : array<string|int, mixed>
$quickReply : QuickReplyBuilder|null
$sender : SenderBuilder|null
$texts : array<string|int, mixed>
__construct() : mixed
  TextMessageBuilder constructor.
buildMessage() : array<string|int, mixed>
  Builds text message structure.

### Properties

#### $message

TextMessageBuilder.php : 38
`private array<string|int, mixed> $message = []`

#### $quickReply

TextMessageBuilder.php : 41
`private QuickReplyBuilder|null $quickReply`

#### $sender

TextMessageBuilder.php : 44
`private SenderBuilder|null $sender`

#### $texts

TextMessageBuilder.php : 35
`private array<string|int, mixed> $texts`

### Methods

#### __construct()

TextMessageBuilder.php : 60

TextMessageBuilder constructor.

`public __construct(string $text[, array<string|int, string>|null $extraTexts = null ]) : mixed`

Exact signature of this constructor is `new TextMessageBuilder(string $text, string[] $extraTexts)`.

Means, this constructor can also receive multiple messages like so;

`$textBuilder = new TextMessageBuilder('text', 'extra text1', 'extra text2', ...);`

##### Parameters

$text : string
$extraTexts : array<string|int, string>|null = null

##### Return values

mixed —

#### buildMessage()

TextMessageBuilder.php : 86

Builds text message structure.

`public buildMessage() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

## Search results