mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-07 00:56:34 +02:00
[core] store parameters values in BridgeAbstract::parameters
This way, any BridgeAbstract method can now have access to these values, no only collectData Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -15,7 +15,8 @@ class CNETBridge extends BridgeAbstract {
|
||||
);
|
||||
}
|
||||
|
||||
public function collectData(array $param) {
|
||||
public function collectData(){
|
||||
$param=$this->parameters[$this->queriedContext];
|
||||
|
||||
function ExtractFromDelimiters($string, $start, $end) {
|
||||
if (strpos($string, $start) !== false) {
|
||||
@@ -42,8 +43,8 @@ class CNETBridge extends BridgeAbstract {
|
||||
return $article_html;
|
||||
}
|
||||
|
||||
if (!empty($param['topic']))
|
||||
$this->topicName = $param['topic'];
|
||||
if (!empty($param['topic']['value']))
|
||||
$this->topicName = $param['topic']['value'];
|
||||
|
||||
$pageUrl = 'http://www.cnet.com/'.(empty($this->topicName) ? '' : 'topics/'.$this->topicName.'/');
|
||||
$html = $this->getSimpleHTMLDOM($pageUrl) or $this->returnServerError('Could not request CNET: '.$pageUrl);
|
||||
|
Reference in New Issue
Block a user