Ajout options chargement client soap
This commit is contained in:
parent
2afe634376
commit
5df479bf49
@ -5,7 +5,7 @@ class WsScores
|
||||
protected $login = '';
|
||||
protected $password = '';
|
||||
|
||||
public function __construct($login = '', $password = ''){
|
||||
public function __construct($login = '', $password = '') {
|
||||
$config = new Zend_Config_Ini(APPLICATION_PATH .
|
||||
'/configs/webservices.ini', APPLICATION_ENV);
|
||||
$this->webservices = $config->webservices->toArray();
|
||||
@ -20,7 +20,7 @@ class WsScores
|
||||
}
|
||||
}
|
||||
|
||||
public function getInfosLogin($login, $ipUtilisateur = ''){
|
||||
public function getInfosLogin($login, $ipUtilisateur = '') {
|
||||
$params = new stdClass();
|
||||
$params->login = $login;
|
||||
$params->ipUtilisateur = $ipUtilisateur;
|
||||
@ -34,11 +34,15 @@ class WsScores
|
||||
}
|
||||
}
|
||||
|
||||
protected function loadClient($webservice){
|
||||
protected function loadClient($webservice) {
|
||||
$wsdl = $this->webservices[$webservice]['wsdl'];
|
||||
$options = $this->webservices[$webservice]['options'];
|
||||
$options['login'] = $this->login;
|
||||
$options['password'] = $this->password;
|
||||
if (APPLICATION_ENV != 'production'){
|
||||
$options['cache_wsdl'] = WSDL_CACHE_NONE;
|
||||
}
|
||||
$options['encoding'] = 'utf-8';
|
||||
$client = new SoapClient($wsdl, $options);
|
||||
return $client;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user