You are here

public static function Messaging_Destination::get_by_address in Messaging 6.4

Same name and namespace in other branches
  1. 7 messaging.destination.inc \Messaging_Destination::get_by_address()

Get destination by method and address. This allows advanced caching.

3 calls to Messaging_Destination::get_by_address()
Messaging_API_Tests::testMessagingBasicAPI in tests/messaging_api.test
Exercise basic API functions
Messaging_Destination::create_type in includes/messaging_destination.class.inc
Create with parameters
Messaging_Destination::validate_type in includes/messaging_destination.class.inc
Validate values to create a destination

File

includes/messaging_destination.class.inc, line 218
Drupal Messaging Framework - Default class file

Class

Messaging_Destination
Message destination class

Code

public static function get_by_address($type, $address) {
  $cached = self::cache_by_address($type, $address);
  if (isset($cached)) {
    return $cached;
  }
  else {
    return self::get(array(
      'type' => $type,
      'address' => $address,
    ));
  }
}