for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Contains \jamesiarmes\PhpEws\SoapClient.
*/
namespace jamesiarmes\PhpEws;
use \jamesiarmes\PhpNtlm\SoapClient as NtlmSoapClient;
* Handles SOAP communication with the Exchange server using NTLM
* authentication.
*
* @package php-ews\Auth
class SoapClient extends NtlmSoapClient
{
* {@inheritdoc}
public function __construct($wsdl, $options)
// If a version was set then add it to the headers.
if (!empty($options['version'])) {
$this->__default_headers[] = new \SoapHeader(
__default_headers
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
'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'])) {
'ExchangeImpersonation',
$options['impersonation']
parent::__construct($wsdl, $options);
* Returns the response code from the last request
* @return integer
public function getResponseCode()
return curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: