abstract class Attachment extends Message (View source)

Class Attachment

Constants

TYPE_IMAGE

Image type

TYPE_AUDIO

Audio type

TYPE_VIDEO

Video type

TYPE_FILE

File type

TYPE_LOCATION

Location type

TYPE_TEMPLATE

Template type

Methods

__construct($sender, $type, array $payload = [])

Attachment constructor.

mixed
getSender()

Get sender id

from Message
array
toData()

To array for send api

array
getPayload()

Get payload

$this
setPayload(array $payload)

Set Payload

$this
enableReuse()

Enable reuse

$this
disableReuse()

Disable reuse

$this
setAttachmentId($id)

Set attachment id

Details

__construct($sender, $type, array $payload = [])

Attachment constructor.

Parameters

$sender
$type
array $payload

mixed getSender()

Get sender id

Return Value

mixed

array toData()

To array for send api

Return Value

array

array getPayload()

Get payload

Return Value

array

$this setPayload(array $payload)

Set Payload

Parameters

array $payload

Return Value

$this

$this enableReuse()

Enable reuse

Return Value

$this

$this disableReuse()

Disable reuse

Return Value

$this

$this setAttachmentId($id)

Set attachment id

Parameters

$id

Return Value

$this