__construct() public method

public __construct ( $wsdl, array $options = [] )
$options array
 /**
  * Constructor
  * 
  * @param string $wsdl
  * @param array $options
  */
 public function __construct($wsdl, $options)
 {
     // verify that a user name and password were entered
     if (empty($options['user']) || empty($options['password'])) {
         throw new EWS_Exception('A username and password is required.');
     }
     // end if no user name and password were entered
     // set the username and password properties
     $this->user = $options['user'];
     $this->password = $options['password'];
     parent::__construct($wsdl, $options);
 }
Example #2
0
 /**
  * Constructor
  * 
  * @param string $wsdl
  * @param array $options
  */
 public function __construct($wsdl, $options)
 {
     // verify that a user name and password were entered
     if (empty($options['user']) || empty($options['password'])) {
         throw new EWS_Exception('A username and password is required.');
     }
     // end if no user name and password were entered
     // set the username and password properties
     $this->user = $options['user'];
     $this->password = $options['password'];
     $soapHeader = new SoapHeader('http://schemas.microsoft.com/exchange/services/2006/types', 'RequestServerVersion Version="Exchange2007_SP1"');
     $this->__setSoapHeaders($soapHeader);
     parent::__construct($wsdl, $options);
 }
Example #3
0
 /**
  * Constructor
  *
  * @param string $wsdl
  * @param array $options
  */
 public function __construct($wsdl, $options)
 {
     // Verify that a user name and password were entered.
     if (empty($options['user']) || empty($options['password'])) {
         throw new EWS_Exception('A username and password is required.');
     }
     // Set the username and password properties.
     $this->user = $options['user'];
     $this->password = $options['password'];
     // If a version was set then add it to the headers.
     if (!empty($options['version'])) {
         $this->__default_headers[] = new SoapHeader('http://schemas.microsoft.com/exchange/services/2006/types', 'RequestServerVersion Version="' . $options['version'] . '"');
     }
     // If impersonation was set then add it to the headers.
     if (!empty($options['impersonation'])) {
         $this->__default_headers[] = new SoapHeader('http://schemas.microsoft.com/exchange/services/2006/types', 'ExchangeImpersonation', $options['impersonation']);
     }
     parent::__construct($wsdl, $options);
 }