getIndiScore
This commit is contained in:
parent
06a97530c2
commit
22405f7c34
@ -30,6 +30,36 @@ class WsScores
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* getIndiScore
|
||||
* @param string $siren
|
||||
* @param string $nic
|
||||
* @param integer $niveau
|
||||
* @param boolean $plus
|
||||
*/
|
||||
public function getIndiScore($siren, $nic=0, $niveau=2, $plus=false)
|
||||
{
|
||||
$params = new stdClass();
|
||||
$params->siren = $siren;
|
||||
$params->nic = $nic;
|
||||
$params->niveau = $niveau;
|
||||
$params->plus = $plus
|
||||
$filename = 'getindiscore-'.$nic.'-'.$niveau;
|
||||
$cache = new Cache($filename);
|
||||
if ($cache->exist() && !$this->toNotCache ){
|
||||
return $cache->getBlock('element');
|
||||
}
|
||||
$client = $this->loadClient('entreprise');
|
||||
try {
|
||||
$reponse = $client->getIndiScore($params);
|
||||
$cache->deletefile();
|
||||
$cache->setBlock('marques', $reponse->getIndiScoreResult);
|
||||
return $reponse->getIndiScoreResult;
|
||||
} catch (SoapFault $fault) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* setLog
|
||||
* @param string $page
|
||||
|
Loading…
x
Reference in New Issue
Block a user