You are here

function heartbeat_encode_message_variables in Heartbeat 6.4

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

Encode heartbeat message variables

5 calls to heartbeat_encode_message_variables()
HeartbeatActivity::log_message in includes/heartbeatactivity.inc
Logs a heartbeat message
heartbeat_activity_rules_action_message_id_js in modules/heartbeat_rules/hrules.module
Callback function to add variables to the user activity actions forms
heartbeat_api_log in ./heartbeat.module
API function to log a message from custom code
_heartbeat_messages_rebuild in ./heartbeat.module
Rebuild the messages and check their status
_heartbeat_message_prepare in ./heartbeat.module
Prepares a record for database storage

File

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

Code

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

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