Michael RICOIS 53e213202b CS PSR-2
2016-11-24 16:02:49 +01:00

52 lines
1.3 KiB
PHP
Executable File

<?php
class Metier_Graydon_Service extends Zend_Soap_Client
{
protected $PartnerClientId = '32790';
protected $PartnerUserId = 'SESS38R7';
protected $ParterPassword = 'E88MSU4p';
public function __construct()
{
//Set the WSDL
$this->_wsdl = __DIR__ . DIRECTORY_SEPARATOR . 'GraydonCompanyData.wsdl';
//Set options
$options = array(
'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,
);
}
/**
*
* @return stdClass
*/
protected function _AuthenticationParameters()
{
$params = new stdClass();
$params->PartnerUserId = $this->PartnerUserId;
$params->PartnerPassword = $this->ParterPassword;
$params->PartnerClientId = '';
$params->SessionID = '';
return $params;
}
/**
*
* @param string $country
*/
public function getCountryAvailability($country = null)
{
$client = $this->getSoapClient();
$params = new stdClass();
$params->Authentication_Parameters = $this->_AuthenticationParameters();
if ($country !== null) {
$params->Country = $country;
}
return $client->getCountryAvailability($params);
}
}