protected function HeartbeatStream::executeQuery in Heartbeat 7
executeQuery
Return value
array results
1 call to HeartbeatStream::executeQuery()
- HeartbeatStream::result in includes/
heartbeatstream.inc - result Prepares a query, makes it available to alter it and finally executes it.
File
- includes/
heartbeatstream.inc, line 701 - HeartbeatStream object is the object that takes stream configuration to create a stream of activity objects. It is the controlling organ at the pre-query, query and post-query phases.
Class
- HeartbeatStream
- Abstract class HeartbeatStream This base class has final template methods which are used by the derived concretes. The HeartbeatStream is a state object that is given to the HeartbeatStreamBuilder to set the access to the current request.
Code
protected function executeQuery() {
// dqm($this->query);
$result = $this->query
->execute()
->fetchAll();
$messages = array();
$uaids = array();
foreach ($result as $key => $row) {
if ($template = $this
->getTemplate($row->message_id)) {
$uaids[$key] = $row->uaid;
}
}
$messages = heartbeat_activity_load_multiple($uaids);
return $messages;
}