public function HeartbeatMessagePool::getMessage in Heartbeat 7
getMessage().
File
- ./
heartbeat.module, line 986 - Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.
Class
- HeartbeatMessagePool
- Class to keep HeartbeatActivity messages in a pool so plugins and such can get the message instead of reloading them.
Code
public function getMessage($uaid) {
if (!isset($this->activity[$uaid])) {
$activity = _heartbeat_activity_load($uaid);
if (!empty($activity)) {
$this
->addMessage($activity);
return $this->activity[$uaid];
}
else {
return NULL;
}
}
else {
return $this->activity[$uaid];
}
}