Ajout de la fonction extract

This commit is contained in:
Damien LASSERRE 2012-02-21 13:39:02 +00:00
parent 915d54a719
commit 5bcee45652

View File

@ -49,6 +49,20 @@ Class Ciblage
}
}
public function extract($structure)
{
$resultats = $this->execute(true);
$total = array(
'total' => count($resultats),
'insee' => $this->calculRedevanceInsee(),
'result'=> $resultats
);
foreach ($total['result']['matches'] as $element) {
$siret[] = $element['attrs']['siren'].$element['attrs']['nic'];
}
return ($siret);
}
public function calculRedevanceInsee()
{
$this->sphinx->SetFilter('presentrcs', array(0));