1
0
Fork 0
forked from blallo/rss-bridge

[FeedExpander] implement default parseItem() method

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-09-12 10:39:34 +02:00
parent 655b3d578d
commit 15c422c648

View file

@ -168,7 +168,20 @@ abstract class FeedExpander extends BridgeAbstract {
* @param $item the input rss item * @param $item the input rss item
* @return a RSS-Bridge Item, with (hopefully) the whole content) * @return a RSS-Bridge Item, with (hopefully) the whole content)
*/ */
abstract protected function parseItem($item); protected function parseItem($item){
switch($this->feedType){
case 'RSS_1_0':
return $this->parseRSS_1_0_Item($item);
break;
case 'RSS_2_0':
return $this->parseRSS_2_0_Item($item);
break;
case 'ATOM_1_0':
return $this->parseATOMItem($item);
break;
default: $this->returnClientError('Unknown version ' . $this->getInput('version') . '!');
}
}
public function getURI(){ public function getURI(){
return $this->uri; return $this->uri;