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:
parent
655b3d578d
commit
15c422c648
1 changed files with 14 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue