class MessageNotifierSMS in Message Notify 7.2
@file SMS notifier.
Hierarchy
- class \MessageNotifierBase implements MessageNotifierInterface
- class \MessageNotifierSMS
Expanded class hierarchy of MessageNotifierSMS
File
- plugins/
notifier/ sms/ MessageNotifierSMS.class.php, line 8 - SMS notifier.
View source
class MessageNotifierSMS extends MessageNotifierBase {
public function deliver(array $output = array()) {
if (empty($this->message->smsNumber)) {
// Try to get the SMS number from the account.
$account = user_load($this->message->uid);
if (!empty($account->sms_user['number'])) {
$this->message->smsNumber = $account->sms_user['number'];
}
}
if (empty($this->message->smsNumber)) {
throw new MessageNotifyException('Message cannot be sent using SMS as the "smsNumber" property is missing from the Message entity or user entity.');
}
return sms_send($this->message->smsNumber, strip_tags($output['message_notify_sms_body']));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MessageNotifierBase:: |
protected | property | The message entity. | |
MessageNotifierBase:: |
protected | property | The plugin definition. | |
MessageNotifierBase:: |
public | function |
Determine if user can access notifier. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Act upon send result. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Entry point to send and process a message. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Constructor for the notifier. Overrides MessageNotifierInterface:: |
|
MessageNotifierSMS:: |
public | function |
Deliver a message via the required transport method. Overrides MessageNotifierBase:: |