mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-30 03:20:30 +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:
@@ -39,21 +39,22 @@ class KununuBridge extends BridgeAbstract{
|
||||
);
|
||||
}
|
||||
|
||||
public function collectData(array $params){
|
||||
public function collectData(){
|
||||
$params=$this->parameters[$this->queriedContext];
|
||||
|
||||
// Get Site
|
||||
$site = strtolower(trim($params['site']));
|
||||
$site = strtolower(trim($params['site']['value']));
|
||||
if(!isset($site) || empty($site) || !$this->site_is_valid($site))
|
||||
$this->returnClientError('You must specify a valid site (&site=...)!');
|
||||
|
||||
// Get Company (fixing whitespace and umlauts)
|
||||
$company = $this->encode_umlauts(strtolower(str_replace(' ', '-', trim($params['company']))));
|
||||
$company = $this->encode_umlauts(strtolower(str_replace(' ', '-', trim($params['company']['value']))));
|
||||
if(!isset($company) || empty($company))
|
||||
$this->returnClientError('You must specify a company (&company=...)!');
|
||||
|
||||
$full = false; // By default we'll load only short article
|
||||
if(isset($params['full']))
|
||||
$full = strtolower(trim($params['full'])) === 'on';
|
||||
if(isset($params['full']['value']))
|
||||
$full = strtolower(trim($params['full']['value'])) === 'on';
|
||||
|
||||
// Get reviews section name (depends on site)
|
||||
$section = '';
|
||||
|
Reference in New Issue
Block a user