Authentication_Parameters = $authentication;
$request->Country = $pays;
$path = PATH_DATA.'/graydon/method';
$fileName = strtolower('CompanyMatchIdentifiers-'.$pays);
if(!file_exists($path.'/'.$fileName)){
try
{
$result = $graydon->getCompanyMatchIdentifiers($request);
$count = count($result->CompanyMatchIdentifiers->CompanyMatchIdentifier);
if ($count>1){
$identifiers = $result->CompanyMatchIdentifiers->CompanyMatchIdentifier;
}elseif($count==1){
$identifiers[] = $result->CompanyMatchIdentifiers->CompanyMatchIdentifier;
}
//Stockage du résultat de la méthode en cache
file_put_contents($path.'/'.$fileName, serialize($identifiers));
}catch( SoapFault $fault ){
require_once 'soaperror.php';
processSoapFault($client,$fault,$tabInfo);
}
}else{
$identifiers = unserialize(file_get_contents($path.'/'.$fileName));
}
if(isset($identifiers)){
$firephp->log($identifiers,'identifiers');
$count = 0;
foreach($identifiers as $identifier){
?>