private static function broadcastTransaction(org_maemo_userdata_transaction $trx) { $cfg = midgardmvc_core::get_instance()->configuration; $user = self::userByUuid($trx->useruuid); $data = json_encode(array('uuid' => $trx->apiuuid, 'action' => $trx->action, 'timestamp' => $trx->metadata->created->format(DATE_W3C), 'data' => self::personToArray($user))); foreach ($cfg->webhooks as $webhook) { $que = new org_maemo_userdata_webhooks_queue(); $que->url = $webhook['url']; $que->payload = $data; $que->create(); } }