\Google\AdsApi\AdManagerAdManagerHeaderHandler

Handles how HTTP and SOAP headers are set for Ad Manager API requests.

Summary

Methods
Properties
Constants
__construct()
generateHttpHeaders()
generateSoapHeaders()
scrubHttpHeaders()
scrubSoapHeaders()
No public properties found
PRODUCT_NAME_FOR_SOAP_HEADER
SOAP_HEADER_CLASS_NAME
No protected methods found
No protected properties found
N/A
createSoapHeaderObject()
formatApplicationNameForSoapHeader()
$httpHeadersToScrub
$adsHeaderFormatter
$reflection
$oAuth2TokenRefresher
N/A

Constants

PRODUCT_NAME_FOR_SOAP_HEADER

PRODUCT_NAME_FOR_SOAP_HEADER

SOAP_HEADER_CLASS_NAME

SOAP_HEADER_CLASS_NAME

Properties

$httpHeadersToScrub

$httpHeadersToScrub :array<mixed,string>

Type

array<mixed,string>—a list of HTTP headers to scrub

$adsHeaderFormatter

$adsHeaderFormatter :

Type

$reflection

$reflection :

Type

$oAuth2TokenRefresher

$oAuth2TokenRefresher :

Type

Methods

__construct()

__construct()

Creates a new instance of this header handler.

generateHttpHeaders()

generateHttpHeaders(\Google\AdsApi\Common\AdsSession  $session): array

Generates the required HTTP headers for the ads API request.

Parameters

\Google\AdsApi\Common\AdsSession $session

session information to use for the headers

Returns

array —

the HTTP headers

generateSoapHeaders()

generateSoapHeaders(\Google\AdsApi\Common\AdsSession  $session,\Google\AdsApi\Common\AdsServiceDescriptor  $serviceDescriptor): \SoapHeader

Sets the required SOAP headers for the ads API request.

Parameters

\Google\AdsApi\Common\AdsSession $session

session information to use for the headers

\Google\AdsApi\Common\AdsServiceDescriptor $serviceDescriptor

Returns

\SoapHeader —

the SOAP headers

scrubHttpHeaders()

scrubHttpHeaders(  $httpHeaders)

Parameters

$httpHeaders

scrubSoapHeaders()

scrubSoapHeaders(  $soapXml)

Parameters

$soapXml

createSoapHeaderObject()

createSoapHeaderObject(\Google\AdsApi\Common\AdsServiceDescriptor  $serviceDescriptor)

Creates a new instance of the SOAP header object used by the Ad Manager API.

Parameters

\Google\AdsApi\Common\AdsServiceDescriptor $serviceDescriptor

formatApplicationNameForSoapHeader()

formatApplicationNameForSoapHeader(  $applicationName)

Parameters

$applicationName