\Overtrue\EasySmsMessage

Class Message.

Summary

Methods
Properties
Constants
__construct()
getMessageType()
getContent()
getTemplate()
setType()
setContent()
setTemplate()
getData()
setData()
getGateways()
setGateways()
__get()
No public properties found
No constants found
No protected methods found
$gateways
$type
$content
$template
$data
N/A
No private methods found
No private properties found
N/A

Properties

$gateways

$gateways : array

Type

array

$type

$type : string

Type

string

$content

$content : string

Type

string

$template

$template : string

Type

string

$data

$data : array

Type

array

Methods

__construct()

__construct(array  $attributes = [], string  $type = MessageInterface::TEXT_MESSAGE) : mixed

Message constructor.

Parameters

array $attributes
string $type

Returns

mixed —

getMessageType()

getMessageType() : string

Return the message type.

Returns

string —

getContent()

getContent(\Overtrue\EasySms\Contracts\GatewayInterface|null  $gateway = null) : string

Return message content.

Parameters

\Overtrue\EasySms\Contracts\GatewayInterface|null $gateway

Returns

string —

getTemplate()

getTemplate(\Overtrue\EasySms\Contracts\GatewayInterface|null  $gateway = null) : string

Return the template id of message.

Parameters

\Overtrue\EasySms\Contracts\GatewayInterface|null $gateway

Returns

string —

setType()

setType( $type) : $this

Parameters

$type

Returns

$this —

setContent()

setContent(mixed  $content) : $this

Parameters

mixed $content

Returns

$this —

setTemplate()

setTemplate(mixed  $template) : $this

Parameters

mixed $template

Returns

$this —

getData()

getData(\Overtrue\EasySms\Contracts\GatewayInterface|null  $gateway = null) : array

Return the template data of message.

Parameters

\Overtrue\EasySms\Contracts\GatewayInterface|null $gateway

Returns

array —

setData()

setData(array|callable  $data) : $this

Parameters

array|callable $data

Returns

$this —

getGateways()

getGateways() : array

Return message supported gateways.

Returns

array —

setGateways()

setGateways(array  $gateways) : $this

Parameters

array $gateways

Returns

$this —

__get()

__get( $property) : string

Parameters

$property

Returns

string —