Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
smsgateway_modica\gateway Class Reference
Inheritance diagram for smsgateway_modica\gateway:
core_sms\gateway

Public Member Functions

 can_send (message $message)
 Confirm whether this gateway can send the given message.
 
 get_send_priority (message $message)
 Get the priority of this gateway for sending the given message.
 
 send (message $message,)
 Send the given message.
 
 to_record ()
 Convert this object to a stdClass.
 
 truncate_message (string $message)
 Truncates the given message to fit the constraints.
 
 update_message_status (message $message)
 Update the status of the given message from the gateway.
 
 update_message_statuses (array $messages)
 Update the statuses of the given messages from the gateway.
 

Public Attributes

stdClass readonly stdClass $config
 The configuration for this instance.
 
string const MODICA_DEFAULT_API = 'https://api.modicagroup.com/rest/gateway/messages'
 MODICA_DEFAULT_API The default api gateway for modica.
 

Protected Attributes

int const MESSAGE_LENGTH_LIMIT = 160 * 3
 The maximum length of a message.
 

Member Function Documentation

◆ can_send()

core_sms\gateway::can_send ( message $message)
inherited

Confirm whether this gateway can send the given message.

Parameters
message$message
Return values
bool

◆ get_send_priority()

smsgateway_modica\gateway::get_send_priority ( message $message)

Get the priority of this gateway for sending the given message.

A priority of 0 means that the gateway cannot send the message. Higher values are higher priority.

This method is called frequently, so should be fast. If calculation is expensive the value should be cached.

Parameters
message$message
Return values
int

Reimplemented from core_sms\gateway.

◆ send()

smsgateway_modica\gateway::send ( message $message)

Send the given message.

Parameters
message$message
Return values
message

Reimplemented from core_sms\gateway.

◆ to_record()

core_sms\gateway::to_record ( )
inherited

Convert this object to a stdClass.

Return values
stdClass

◆ truncate_message()

core_sms\gateway::truncate_message ( string $message)
inherited

Truncates the given message to fit the constraints.

Parameters
string$messageThe message to be truncated.
Return values
stringThe truncated message.

◆ update_message_status()

core_sms\gateway::update_message_status ( message $message)
inherited

Update the status of the given message from the gateway.

Parameters
message$message
Return values
message
Exceptions
coding_exception

◆ update_message_statuses()

core_sms\gateway::update_message_statuses ( array $messages)
inherited

Update the statuses of the given messages from the gateway.

Parameters
message[]$messages
Return values
message[]

The documentation for this class was generated from the following file: