You are here

class Messaging_Mail_Address in Messaging 7

Mail addresses

Hierarchy

Expanded class hierarchy of Messaging_Mail_Address

1 string reference to 'Messaging_Mail_Address'
messaging_mail_messaging in messaging_mail/messaging_mail.module
Implementation of hook_messaging().

File

messaging_mail/messaging_mail.inc, line 212
Drupal Messaging Framework - Send_Method class file

View source
class Messaging_Mail_Address extends Messaging_Destination {
  public $type = 'mail';

  /**
   * Get name for display
   */
  function address_name() {
    return t('E-mail address');
  }

  /**
   * Get user from address
   */
  public static function get_user_from_address($mail) {
    return user_load_by_mail($mail);
  }

  /**
   * Get address from user
   */
  public static function get_address_from_user($user) {
    if ($user = messaging_user_object($user)) {
      return !empty($user->mail) ? $user->mail : NULL;
    }
  }
  public static function validate_address($address, $type = NULL) {
    return valid_email_address($address);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Messaging_Destination::$address public property 1
Messaging_Destination::$mdid public property
Messaging_Destination::$name public property
Messaging_Destination::$sent public property
Messaging_Destination::$status public property
Messaging_Destination::$uid public property
Messaging_Destination::address_info function Get address type information
Messaging_Destination::build public static function Build destination object
Messaging_Destination::build_address public static function Build from address
Messaging_Destination::build_method public static function Build from method, address, user
Messaging_Destination::build_object public static function Build destination from db object Overrides Messaging_Object::build_object
Messaging_Destination::build_type public static function Build from address type
Messaging_Destination::build_user public static function Build from user account
Messaging_Destination::cache_by_address public static function Cache get/set by method and address
Messaging_Destination::cache_delete public function Save object to cache
Messaging_Destination::cache_get public static function
Messaging_Destination::cache_save public function Save object to cache
Messaging_Destination::cache_set public static function
Messaging_Destination::create public static function Create from array data
Messaging_Destination::create_method public static function Create for sending method
Messaging_Destination::create_type public static function Create with parameters
Messaging_Destination::delete_multiple public static function Delete messaging destination object/s
Messaging_Destination::format function Format destination
Messaging_Destination::format_address public static function Format address. 1
Messaging_Destination::get public static function Get from db using conditions
Messaging_Destination::get_address function Get address for sending 1
Messaging_Destination::get_by_address public static function Get destination by method and address. This allows advanced caching.
Messaging_Destination::get_name function Get address name (will be user name if available)
Messaging_Destination::get_title function Get address type name for display
Messaging_Destination::get_user function Get user account
Messaging_Destination::index function Get unique index for this destination 1
Messaging_Destination::invoke_all protected function Run module_invoke_all('notifications_subscription') with this object
Messaging_Destination::load public static function Load object from database
Messaging_Destination::load_multiple public static function Load multiple events
Messaging_Destination::set_user function Set user for this destination 1
Messaging_Destination::static_invoke protected static function Invoke static method on address type.
Messaging_Destination::STATUS_ACTIVE constant
Messaging_Destination::STATUS_PENDING constant
Messaging_Destination::validate_method public static function Validate values to create a destination
Messaging_Destination::validate_type public static function Validate values to create a destination
Messaging_Destination::__toString public function
Messaging_Mail_Address::$type public property Overrides Messaging_Destination::$type
Messaging_Mail_Address::address_name function Get name for display
Messaging_Mail_Address::get_address_from_user public static function Get address from user Overrides Messaging_Destination::get_address_from_user
Messaging_Mail_Address::get_user_from_address public static function Get user from address Overrides Messaging_Destination::get_user_from_address
Messaging_Mail_Address::validate_address public static function Validate address format Overrides Messaging_Destination::validate_address
Messaging_Object::__construct public function Constructor