issue #0001709: config params to giant.ini

This commit is contained in:
Arman KYOKCHAN 2013-09-18 10:56:42 +00:00
parent a923e17eb0
commit 37ddd531d0
4 changed files with 35 additions and 13 deletions

View File

@ -9,6 +9,7 @@ require_once 'common/dates.php';
class GiantController extends Zend_Controller_Action
{
protected $TestIndication = false;
protected $config = array();
protected $TestCompanies = array(
'BE' => array(
@ -43,9 +44,12 @@ class GiantController extends Zend_Controller_Action
public function init()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
$this->view->debug = false;
$this->config = new Zend_Config_Ini( '\Giant\giant.ini' );
$this->TestIndication = $this->config->test->TestIndication;
}
public function searchAction()

View File

@ -16,7 +16,7 @@ Class GiantControllerLib
public function __construct($companyId)
{
$this->configVal = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant_config.ini' );
$this->configVal = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant.ini' );
$c = Zend_Registry::get('config');
$this->pathImg = $c->profil->path->pages.'/imgcache/'.$companyId;
}
@ -274,7 +274,7 @@ Class GiantRechercheController extends GiantFunction
$this->Provider->CountryCode = $CountryCode;
$this->Provider->ProviderId = parent::setCountryCode($CountryCode, $this->listAutorized);
$this->Provider->TestIndication = true;
$this->soapG = new WSgiant($this->Provider);
$this->soapG = new WSgiant($this->Provider,$TestIndication);
}
public function Liste($parametres, $page)

View File

@ -7,10 +7,12 @@ class WSgiant extends Zend_Soap_Client
{
protected $wsService = array();
protected $header;
protected $TestIndication;
function __construct($parametres)
function __construct($parametres,$TestIndication)
{
$this->wsService = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant.ini' );
$this->TestIndication = $TestIndication;
if($parametres InstanceOF stdClass)
self::init($parametres);
}
@ -21,16 +23,17 @@ class WSgiant extends Zend_Soap_Client
*/
private function init($parametres)
{
$password='password'.$this->TestIndication;
$utilisateur = new Scores_Utilisateur();
$options = array(
'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS,
'soapVersion' => SOAP_1_1,
'login' => $this->wsService->options->login,
'password' => $this->wsService->options->password,
'password' => $this->wsService->options->$password,
'compression' => SOAP_COMPRESSION_ACCEPT
);
$this->setOptions($options);
print_r($options);
$giantHeader = new stdClass();
$giantHeader->ConsumerId = $this->wsService->header->ConsumerId;
$giantHeader->CustomerId = $utilisateur->getLogin();
@ -55,7 +58,9 @@ class WSgiant extends Zend_Soap_Client
*/
public function getAllMethodesFromWsdl($service)
{
$this->setWsdl($this->wsService->$service->wsdl);
$wsdl = 'wsdl'.$this->TestIndication;
$this->setWsdl($this->wsService->$service->$wsdl);
print_r($this->wsService->$service->$wsdl);
return ($this);
}
}

View File

@ -6,16 +6,29 @@ serviceName = "ServiceHeader"
[options]
login = "006"
;password = "mZ0kXvQ03tPC1"
password = 'ClaudeMonet'
password0 = "mZ0kXvQ03tPC1"
password1 = 'ClaudeMonet'
soap_version = SOAP_1_1
[search]
;wsdl = "https://services.giant-net.com/search/v1?wsdl"
wsdl0 = "https://services.giant-net.com/search/v1?wsdl"
;wsdl = "http://194.150.14.129/search/v1?wsdl"
wsdl = "https://services-acc.giant-net.com/search/v1?wsdl"
wsdl1 = "https://services-acc.giant-net.com/search/v1?wsdl"
;wsdl = "http://giant-tst.graydon.nl/search/v1?wsdl"
[credit-data]
wsdl = "https://services-acc.giant-net.com/credit-data/v1?wsdl"
wsdl1 = "https://services-acc.giant-net.com/credit-data/v1?wsdl"
;wsdl = "http://194.150.14.129/credit-data/v1?wsdl"
;wsdl = "https://services.giant-net.com/credit-data/v1?wsdl"
;wsdl = "http://giant.sd.dev/services/wsdl/credit-data-service-provider-api-1.0.wsdl"
wsdl0 = "https://services.giant-net.com/credit-data/v1?wsdl"
;wsdl = "http://giant.sd.dev/services/wsdl/credit-data-service-provider-api-1.0.wsdl"
[price]
test = "0"
snd = "7"
other = "10"
[cache]
lifetime = "86403"
[test]
TestIndication = '1'