You are here

public function Messaging_Message::send in Messaging 6.4

Same name and namespace in other branches
  1. 6.3 classes/messaging_message.class.inc \Messaging_Message::send()
  2. 7 messaging.message.inc \Messaging_Message::send()

Send message through sending method.

The message may need to be processed and it can be queued or discarded yet.

1 call to Messaging_Message::send()
Messaging_Message::process in includes/messaging_message.class.inc
Check whether the message is to be sent / queued

File

includes/messaging_message.class.inc, line 201
Drupal Messaging Framework - Message class file

Class

Messaging_Message
Message class

Code

public function send($destination = NULL) {
  if (isset($destination)) {
    $this
      ->set_destination($destination);
  }
  if (!$this->processed) {
    return $this
      ->process();
  }
  else {

    // The message has been processed and it is for sending
    $this
      ->message_log('Sending message.');
    return $this
      ->send_method()
      ->message_send($this);
  }
}