74 lines
1.8 KiB
PHP
74 lines
1.8 KiB
PHP
|
<?php
|
||
|
Class RequestHistorique
|
||
|
{
|
||
|
public $siren;
|
||
|
public $raisonSociale;
|
||
|
public $Adress;
|
||
|
public $faxTel;
|
||
|
public $naf;
|
||
|
public $pays;
|
||
|
public $page;
|
||
|
}
|
||
|
|
||
|
Class Historique
|
||
|
{
|
||
|
private $lastRequest;
|
||
|
private $listRequest = array();
|
||
|
public $vide;
|
||
|
|
||
|
public function __construct()
|
||
|
{
|
||
|
//$this->lastRequest = new RequestHistorique();
|
||
|
$this->vide = true;
|
||
|
}
|
||
|
|
||
|
public function setLastRequest($parametres)
|
||
|
{
|
||
|
$this->vide = false;
|
||
|
$this->lastRequest = new RequestHistorique();
|
||
|
if (is_array($parametres)) {
|
||
|
$this->lastRequest->siret = $parametres['siret'];
|
||
|
$this->lastRequest->raisonSociale = $parametres['raisonSociale'];
|
||
|
$this->lastRequest->Adress = $parametres['numero'].':'.$parametres['voie'].':'.$parametres['cpVille'];
|
||
|
$this->lastRequest->telFax = $parametres['telFax'];
|
||
|
$this->lastRequest->naf = $parametres['naf'];
|
||
|
$this->lastRequest->pays = $parametres['pays'];
|
||
|
} else {
|
||
|
throw new Exception('"$parametres" : n\'est pas une instance de "Zend_Controller_Action"');
|
||
|
}
|
||
|
return ($this->lastRequest);
|
||
|
}
|
||
|
|
||
|
public function isExists()
|
||
|
{
|
||
|
if(count($this->listRequest) > 0)
|
||
|
return (true);
|
||
|
return (false);
|
||
|
}
|
||
|
|
||
|
public function setSiret($siret)
|
||
|
{
|
||
|
$this->lastRequest->siret = $siret;
|
||
|
}
|
||
|
|
||
|
public function getPage()
|
||
|
{
|
||
|
return ($this->lastRequest->page);
|
||
|
}
|
||
|
|
||
|
public function setListRequest($parametres)
|
||
|
{
|
||
|
$this->listRequest[] = self::setLastRequest($parametres);
|
||
|
}
|
||
|
|
||
|
public function getLastRequest()
|
||
|
{
|
||
|
return ($this->lastRequest);
|
||
|
}
|
||
|
|
||
|
public function getListRequest()
|
||
|
{
|
||
|
return ($this->listRequest);
|
||
|
}
|
||
|
|
||
|
}
|