public function heartbeatParser::build_sets in Heartbeat 6.3
Same name and namespace in other branches
- 6.4 includes/heartbeatparser.inc \heartbeatParser::build_sets()
- 7 includes/heartbeatparser.inc \heartbeatParser::build_sets()
build sets of messages
File
- includes/
heartbeatparser.inc, line 25
Class
Code
public function build_sets($messages_raw) {
$renewal_time = $_SERVER['REQUEST_TIME'] - $this->_timespan_gap;
$raw_messages = array();
foreach ($messages_raw as $key => $message) {
// if the time with the gap exceeds the starttime
if ($renewal_time >= $message->timestamp) {
// reset the start time of the set
$renewal_time = $message->timestamp - $this->_timespan_gap;
}
$this->_sets[$renewal_time][$key] = new HeartbeatActivity($message);
}
}