You are here

function rules_unpack_variables in Rules 6

Unacks the given packed variables.

Parameters

$packed: Packed variables, as returned from rules_pack_variables().

Return value

An array, containing the key 'variables' with info about the packed variables and the key 'data' with the actual data. If unpacking failed, FALSE.

1 call to rules_unpack_variables()
rules_scheduler_cron in rules_scheduler/rules_scheduler.module
Implementation of hook_cron().

File

rules/rules.variables.inc, line 252
Provides functions and classes for handling variables

Code

function rules_unpack_variables($packed) {
  foreach (array_values($packed['variables']) as $i => $info) {
    $type = rules_get_data_object($info);
    if (isset($type) && $type
      ->is_identifiable()) {
      $packed['data'][$i] = $type
        ->load($packed['data'][$i]);
      if ($packed['data'][$i] === FALSE) {
        return FALSE;
      }
    }
  }
  return $packed;
}