public function init($config)
{
if ($this->getApplication()->getConfigurationType() == TApplication::CONFIG_TYPE_PHP) {
if (is_array($config)) {
foreach ($config as $id => $feed) {
$this->_feeds[$id] = $feed;
}
}
} else {
foreach ($config->getElementsByTagName('feed') as $feed) {
if (($id = $feed->getAttributes()->remove('id')) !== null) {
$this->_feeds[$id] = $feed;
} else {
throw new TConfigurationException('feedservice_id_required');
}
}
}
}