save($folder);
$feed = OC_News_Utils::fetch( 'http://algorithmsforthekitchen.com/blog/?feed=rss2' );
echo '
' . $feed->getTitle() . '
';
$feedmapper->save($feed, $folder->getId());
$feed = $feedmapper->findWithItems($feed->getId());
echo '
' . $feed->getTitle() . '
';
$items = $feed->getItems();
foreach($items as $item) {
echo $item->getTitle() . ' - ';
if ($item->isRead()) {
echo $l->t('Read');
}
else {
echo $l->t('Unread');
}
echo '
';
$item->setRead();
}
foreach($items as $item) {
echo $item->getStatus();
}
echo '
';
$feedmapper->save($feed, $folder->getId());
echo '
...after saving and reloading';
$feed = $feedmapper->findWithItems($feed->getId());
echo '
' . $feed->getTitle() . '
';
$items = $feed->getItems();
foreach($items as &$item) {
echo $item->getTitle() . ' - ';
if ($item->isRead()) {
echo $l->t('Read');
}
else {
echo $l->t('Unread');
}
echo '
';
}