You are here

function heartbeat_encode_message_variables in Heartbeat 7

Same name and namespace in other branches
  1. 6.4 heartbeat.common.inc \heartbeat_encode_message_variables()
  2. 6.2 heartbeat.module \heartbeat_encode_message_variables()
  3. 6.3 heartbeat.common.inc \heartbeat_encode_message_variables()

Encode heartbeat message variables

File

./heartbeat.module, line 1655
Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.

Code

function heartbeat_encode_message_variables($array) {
  $string = '';
  foreach ($array as $key => $value) {
    if (is_array($value)) {
      $value = implode('***', $value);
    }
    $string .= $key . '=|=' . $value . '-|-';
  }

  //$string = serialize((object)$array);
  return $string;
}