Menu

## FlexMessageBuilder
in package
implements MessageBuilder

FlexMessageBuilder.php : 33

A builder class for flex message.

### Interfaces, Classes and Traits

MessageBuilder
  The interface that has a responsibility to build message.

### Table of Contents

$altText : string
$containerBuilder : ContainerBuilder
$message : array<string|int, mixed>|null
$quickReply : QuickReplyBuilder|null
$sender : SenderBuilder|null
__construct() : mixed
  FlexMessageBuilder constructor.
builder() : FlexMessageBuilder
  Create empty FlexMessageBuilder.
buildMessage() : array<string|int, mixed>
  Builds flex message structure.
setAltText() : FlexMessageBuilder
  Set altText.
setContents() : FlexMessageBuilder
  Set contents.
setQuickReply() : FlexMessageBuilder
  Set quickReply.
setSender() : FlexMessageBuilder
  Set sender.

### Properties

#### $altText

FlexMessageBuilder.php : 36
`private string $altText`

#### $containerBuilder

FlexMessageBuilder.php : 38
`private ContainerBuilder $containerBuilder`

#### $message

FlexMessageBuilder.php : 47
`private array<string|int, mixed>|null $message`

#### $quickReply

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

#### $sender

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

### Methods

#### __construct()

FlexMessageBuilder.php : 57

FlexMessageBuilder constructor.

`public __construct(string|null $altText, ContainerBuilder|null $containerBuilder[, QuickReplyBuilder|null $quickReply = null ][, SenderBuilder|null $sender = null ]) : mixed`

##### Parameters

$altText : string|null
$containerBuilder : ContainerBuilder|null
$quickReply : QuickReplyBuilder|null = null
$sender : SenderBuilder|null = null

##### Return values

mixed —

#### builder()

FlexMessageBuilder.php : 74

Create empty FlexMessageBuilder.

`public static builder() : FlexMessageBuilder`

##### Return values

FlexMessageBuilder —

#### buildMessage()

FlexMessageBuilder.php : 132

Builds flex message structure.

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

##### Return values

array<string|int, mixed> —

#### setAltText()

FlexMessageBuilder.php : 85

Set altText.

`public setAltText(string $altText) : FlexMessageBuilder`

##### Parameters

$altText : string

##### Return values

FlexMessageBuilder —

#### setContents()

FlexMessageBuilder.php : 97

Set contents.

`public setContents(ContainerBuilder $containerBuilder) : FlexMessageBuilder`

##### Parameters

$containerBuilder : ContainerBuilder

##### Return values

FlexMessageBuilder —

#### setQuickReply()

FlexMessageBuilder.php : 109

Set quickReply.

`public setQuickReply([QuickReplyBuilder|null $quickReply = null ]) : FlexMessageBuilder`

##### Parameters

$quickReply : QuickReplyBuilder|null = null

##### Return values

FlexMessageBuilder —

#### setSender()

FlexMessageBuilder.php : 121

Set sender.

`public setSender([SenderBuilder|null $sender = null ]) : FlexMessageBuilder`

##### Parameters

$sender : SenderBuilder|null = null

##### Return values

FlexMessageBuilder —

## Search results