示例#1
0
 /**
  * constructor
  *
  * @param array $options Associative array of options
  */
 public function __construct(array $options = array())
 {
     $this->_credential = new Zend_Service_DeveloperGarden_Credential();
     while (list($name, $value) = each($options)) {
         switch (ucfirst($name)) {
             case 'Username':
                 $this->_credential->setUsername($value);
                 break;
             case 'Password':
                 $this->_credential->setPassword($value);
                 break;
             case 'Realm':
                 $this->_credential->setRealm($value);
                 break;
             case 'Environment':
                 $this->setEnvironment($value);
         }
     }
     if (empty($this->_wsdlFile)) {
         throw new Zend_Service_DeveloperGarden_Exception('_wsdlFile not set for this service.');
     }
     if (!empty($this->_wsdlFileLocal)) {
         $this->_wsdlFileLocal = realpath(__DIR__ . '/../' . $this->_wsdlFileLocal);
     }
     if (empty($this->_wsdlFileLocal) || $this->_wsdlFileLocal === false) {
         throw new Zend_Service_DeveloperGarden_Exception('_wsdlFileLocal not set for this service.');
     }
 }
示例#2
0
 /**
  * constructor
  *
  * @param array $options Associative array of options
  */
 public function __construct(array $options = array())
 {
     $this->_credential = new Zend_Service_DeveloperGarden_Credential();
     while (list($name, $value) = each($options)) {
         switch (ucfirst($name)) {
             case 'Username':
                 $this->_credential->setUsername($value);
                 break;
             case 'Password':
                 $this->_credential->setPassword($value);
                 break;
             case 'Realm':
                 $this->_credential->setRealm($value);
                 break;
             case 'Environment':
                 $this->setEnvironment($value);
         }
     }
     if (empty($this->_wsdlFile)) {
         require_once PHP_LIBRARY_PATH . 'Zend/Service/DeveloperGarden/Exception.php';
         throw new Zend_Service_DeveloperGarden_Exception('_wsdlFile not set for this service.');
     }
     if (!empty($this->_wsdlFileLocal)) {
         $this->_wsdlFileLocal = cleanPath(dirname(__FILE__) . '/../' . $this->_wsdlFileLocal);
     }
     if (empty($this->_wsdlFileLocal) || $this->_wsdlFileLocal === false) {
         require_once PHP_LIBRARY_PATH . 'Zend/Service/DeveloperGarden/Exception.php';
         throw new Zend_Service_DeveloperGarden_Exception('_wsdlFileLocal not set for this service.');
     }
 }