You are here

function messaging_send_method in Messaging 6.3

Same name and namespace in other branches
  1. 6.4 messaging.module \messaging_send_method()
  2. 7 messaging.module \messaging_send_method()

Get send method object

Parameters

$method: Method name or Messaging_Method object

3 calls to messaging_send_method()
Messaging_Message::method_invoke in classes/messaging_message.class.inc
Invoke method callback with this message
messaging_message_send in ./messaging.module
Send message to array of destinations using the same method. The message is rendered just once.
messaging_user_destination in ./messaging.module
Get destination from user account.

File

./messaging.module, line 1149

Code

function messaging_send_method($method) {
  $send_methods =& messaging_static(__FUNCTION__);
  if (is_object($method)) {
    return $method;
  }
  if (!isset($send_methods[$method])) {
    $info = messaging_method_info($method);
    $class = !empty($info['class']) ? $info['class'] : 'Messaging_Send_Method';
    $send_methods[$method] = new $class($info, $method);
  }
  return $send_methods[$method];
}