You are here

function heartbeat_encode_message_variables in Heartbeat 6.3

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. 7 heartbeat.module \heartbeat_encode_message_variables()

Encode heartbeat message variables

4 calls to heartbeat_encode_message_variables()
heartbeat_api_log in ./heartbeat.module
API function to log a message from custom code
heartbeat_messages_add_submit in ./heartbeat.admin.inc
Accept the form submission to add messages.
heartbeat_messages_edit_submit in ./heartbeat.admin.inc
Accept the form submission heartbeat messages to edit.
heartbeat_messages_install in ./heartbeat.module
Function to install default records

File

./heartbeat.common.inc, line 34
Commonly functions used in heartbeat

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;
}