Utilisation des bonnes méthodes de SessionCiblage
This commit is contained in:
parent
3794151424
commit
ab2e0c289a
@ -25,7 +25,7 @@ class ComptageController extends Zend_Controller_Action
|
||||
|
||||
//Comptage
|
||||
require_once 'Scores/Ciblage.php';
|
||||
$ciblage = new Ciblage($session->getSession());
|
||||
$ciblage = new Ciblage($session->getCriteres());
|
||||
$total = $ciblage->execute();
|
||||
$insee = $ciblage->calculeRedevanceInsee();
|
||||
|
||||
@ -39,4 +39,29 @@ class ComptageController extends Zend_Controller_Action
|
||||
);
|
||||
echo json_encode($result);
|
||||
}
|
||||
|
||||
public function saveAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$ref = $request->getParam('ref');
|
||||
|
||||
//Session
|
||||
require_once 'Scores/SessionCiblage.php';
|
||||
$session = new SessionCiblage();
|
||||
|
||||
$criteres = $session->getCriteres();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$resultat = '';
|
||||
$nbInsee = '';
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
require_once('commons/dates.php');
|
||||
class SessionCiblage
|
||||
{
|
||||
protected $criteres = array('nbMPubli' , 'dirNom', 'lieuAct', 'adrDom','total', 'insee', 'siege', 'adr_cp', 'adr_dep', 'adr_com', 'tel', 'fax', 'cj', 'capital', 'ape_etab', 'ape_entrep', 'age_entrep',
|
||||
@ -22,11 +21,6 @@ class SessionCiblage
|
||||
$session->ciblage = $this->valeur;
|
||||
}
|
||||
|
||||
public function getSession()
|
||||
{
|
||||
return $this->valeur;
|
||||
}
|
||||
|
||||
public function setCritere($key, $value)
|
||||
{
|
||||
if(in_array($key, $this->criteres)) {
|
||||
@ -45,12 +39,16 @@ class SessionCiblage
|
||||
}
|
||||
}
|
||||
|
||||
public function getCritere()
|
||||
public function getCritere($key)
|
||||
{
|
||||
if(in_array($key, $this->criteres)) {
|
||||
return $this->valeur[$key];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getCriteres()
|
||||
{
|
||||
/* @todo provisoir... prévoir une verification*/
|
||||
return $this->valeur;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user