Select Git revision
UserTest.php
functions.inc.php 692 B
<?php
function getCAPData($config)
{
try {
$url = isset($config['proxyUrl']) ? $config['proxyUrl'] :'http://www.getrave.com/rss/unl/channel1';
$alerts = new UNL_Alert_RaveRSS($url);
if (!empty($config['recentTimeframe'])) {
$filtered = new UNL_Alert_RecentPubDateFilter($alerts->getIterator(), $config['recentTimeframe']);
} else {
$filtered = new UNL_Alert_RecentPubDateFilter($alerts->getIterator());
}
$data = new UNL_Alert_RSSToCAP($filtered);
$output = $data->getData();
} catch (Exception $e) {
$output = array();
}
return new UNL_Alert_ArrayObject($output);
}