mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-10 10:34:15 +02:00
[bridges] Change all occurrences of the Item object to array
This commit is contained in:
@@ -18,11 +18,11 @@ class NasaApodBridge extends BridgeAbstract{
|
||||
for($i = 0; $i < 3;$i++)
|
||||
{
|
||||
$line = $list[$i];
|
||||
$item = new \Item();
|
||||
$item = array();
|
||||
|
||||
$uri_page = $html->find('a',$i + 3)->href;
|
||||
$uri = 'http://apod.nasa.gov/apod/'.$uri_page;
|
||||
$item->uri = $uri;
|
||||
$item['uri'] = $uri;
|
||||
|
||||
$picture_html = $this->getSimpleHTMLDOM($uri);
|
||||
$picture_html_string = $picture_html->innertext;
|
||||
@@ -35,11 +35,11 @@ class NasaApodBridge extends BridgeAbstract{
|
||||
|
||||
//Extract date from the picture page
|
||||
$date = explode(" ", $picture_html->find('p',1)->innertext);
|
||||
$item->timestamp = strtotime($date[4].$date[3].$date[2]);
|
||||
$item['timestamp'] = strtotime($date[4].$date[3].$date[2]);
|
||||
|
||||
//Other informations
|
||||
$item->content = $media.'<br />'.$explanation;
|
||||
$item->title = $picture_html->find('b',0)->innertext;
|
||||
$item['content'] = $media.'<br />'.$explanation;
|
||||
$item['title'] = $picture_html->find('b',0)->innertext;
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user