You are here

class MailsystemDelegateMailSystem in Mail System 7.3

A mailsystem delegate implementation that forwards to another implementation.

Hierarchy

Expanded class hierarchy of MailsystemDelegateMailSystem

4 string references to 'MailsystemDelegateMailSystem'
mailsystem_delegate_set_mailsystem_settings in ./mailsystem.module
Save settings for the delegate mail system for a given mail-id.
mailsystem_read_settings in ./mailsystem.module
Returns a list of module delegations.
mailsystem_system_info_alter in ./mailsystem.module
Implements hook_system_info_alter().
_mailsystem_delegate_get_mailsystem in ./mailsystem.module
Returns an MailSystemInterface class instance for a given action.

File

./MailsystemDelegateMailSystem.inc, line 11
Class for formatting and actually sending a message.

View source
class MailsystemDelegateMailSystem implements MailSystemInterface {

  /**
   * Implements MailSystemInterface::format().
   *
   * Retrieve the configured class responsible for formatting a message of a
   * given module and mail-key. Forwards the formatting to that class.
   */
  public function format(array $message) {
    $module = $message['module'];
    $key = $message['key'];
    $mailsystem = _mailsystem_delegate_get_mailsystem($module, $key, 'format');
    return $mailsystem
      ->format($message);
  }

  /**
   * Implements MailSystemInterface::mail().
   *
   * Retrieve the configured class responsible for delivering a message of a
   * given module and mail-key. Forwards the call to that class.
   */
  public function mail(array $message) {
    $module = $message['module'];
    $key = $message['key'];
    $mailsystem = _mailsystem_delegate_get_mailsystem($module, $key, 'mail');
    return $mailsystem
      ->mail($message);
  }

}

Members