You are here

function messaging_store_unpack in Messaging 6.3

Same name and namespace in other branches
  1. 5 messaging.store.inc \messaging_store_unpack()
  2. 6 messaging.store.inc \messaging_store_unpack()
  3. 6.2 messaging.store.inc \messaging_store_unpack()

Unpack data as specific class object

3 calls to messaging_store_unpack()
messaging_store_get in ./messaging.store.inc
Retrieve from messaging database storage
messaging_store_load in ./messaging.store.inc
Load single message from store
messaging_store_queue_process_step in ./messaging.store.inc
Retrieve and send queued messages

File

./messaging.store.inc, line 290
Database storage for the messaging framework

Code

function messaging_store_unpack($stored, $class) {
  drupal_unpack($stored);
  if (is_a($stored, $class)) {

    // If the object is already that class, just return
    return $stored;
  }
  else {
    $object = new $class($stored);
    return $object;
  }
}