Fonction d'extraction
This commit is contained in:
parent
ef01f0d618
commit
bc1a47cc5c
@ -89,4 +89,26 @@ class Object_Comptage extends Libs_Row
|
||||
);
|
||||
return (json_encode($result));
|
||||
}
|
||||
|
||||
public function extract()
|
||||
{
|
||||
require_once 'Scores/SessionCiblage.php';
|
||||
require_once 'Scores/Field.php';
|
||||
require_once 'Scores/Ciblage.php';
|
||||
|
||||
$session = new SessionCiblage();
|
||||
$sessionValeur = $session->getCritere($key);
|
||||
$field = new Fields();
|
||||
$ciblage = new Ciblage($field->getValues());
|
||||
$resultats = $ciblage->execute(true);
|
||||
$total = array(
|
||||
'total' => count($resultats),
|
||||
'insee' => $ciblage->calculRedevanceInsee(),
|
||||
'result'=> $resultats
|
||||
);
|
||||
foreach ($total['result']['matches'] as $element) {
|
||||
$siret[] = $element['attrs']['siren'].$element['attrs']['nic'];
|
||||
}
|
||||
return ($siret);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user