protected function soapHeaders()
    {
        // If the headers have already been built, no need to do so again.
        if (!empty($this->headers)) {
            return $this->headers;
        }

        $this->headers = array();

        // Set the schema version.
        $this->headers[] = new \SoapHeader(
            'http://schemas.microsoft.com/exchange/services/2006/types',
            'RequestServerVersion Version="' . $this->version . '"'
        );

        // If impersonation was set then add it to the headers.
        if (!empty($this->impersonation)) {
            $this->headers[] = new \SoapHeader(
                'http://schemas.microsoft.com/exchange/services/2006/types',
                'ExchangeImpersonation',
                $this->impersonation
            );
        }

        if (!empty($this->timezone)) {
            $this->headers[] = new \SoapHeader(
                'http://schemas.microsoft.com/exchange/services/2006/types',
                'TimeZoneContext',
                array(
                    'TimeZoneDefinition' => array(
                        'Id' => $this->timezone,
                    )
                )
            );
        }

        return $this->headers;
    }