utiliser Scores_Ws_Client dans controlleur
This commit is contained in:
parent
2ad0a5a5b0
commit
3803ae948f
@ -666,8 +666,12 @@ class IdentiteController extends Zend_Controller_Action
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('edition', $user->checkModeEdition());
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
$params = new stdClass();
|
||||
$params->lienRef = $lienRef;
|
||||
|
||||
|
||||
$ws = new Scores_Ws_Client('entreprise', '0.8');
|
||||
|
||||
if ($lienRef) {
|
||||
|
||||
@ -677,7 +681,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$this->view->headTitle()->prepend('Liens inter-entreprises - Id '.$lienRef);
|
||||
}
|
||||
|
||||
$identite = $ws->getLienRef($lienRef);
|
||||
$identite = $ws->getLienRef($params);
|
||||
$this->view->assign('raisonSociale', $identite->raisonSociale);
|
||||
$this->view->assign('identification', $identite->identification);
|
||||
$this->view->assign('isin', $identite->isin);
|
||||
@ -702,11 +706,11 @@ class IdentiteController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
//Get links
|
||||
$infos = $ws->getLiensById($lienRef);
|
||||
$infos = $ws->getLiensById($params);
|
||||
|
||||
} else {
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$params->siren = $siren;
|
||||
if (empty($autrePage)) {
|
||||
$this->view->headTitle()->prepend('Liens inter-entreprises - Siren '.$siren);
|
||||
}
|
||||
@ -727,8 +731,8 @@ class IdentiteController extends Zend_Controller_Action
|
||||
), 'default', true) );
|
||||
}
|
||||
|
||||
$infos = $ws->getLiens($siren);
|
||||
if (is_string($infos) || $infos === false) $this->forward('soap', 'error');
|
||||
$infos = $ws->getLiens($params);
|
||||
if (is_string($infos) || $infos === false) $this->view->msg = "Erreur";
|
||||
}
|
||||
|
||||
if (isset($session)) {
|
||||
@ -738,15 +742,16 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$this->view->assign('PP', true);
|
||||
|
||||
//@todo : using this function is strange - How to get the id before ?
|
||||
$result = $ws->searchLienRef($siren, 'siren');
|
||||
$result = $ws->searchLienRef($params, 'siren');
|
||||
if (count($result->item)>0) {
|
||||
foreach ($result->item as $item) {
|
||||
$id = $item->id;
|
||||
$id = $item->id;
|
||||
$params->id = $id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$result = $ws->getLienRef($id);
|
||||
$result = $ws->getLienRef($params);
|
||||
$this->view->assign('nom', $result->nom);
|
||||
$this->view->assign('prenom', $result->prenom);
|
||||
$this->view->assign('civilite', $result->civilite);
|
||||
|
Loading…
Reference in New Issue
Block a user