src/Google/AdsApi/Common/AdsHeaderFormatter.php
public function formatApplicationNameForGuzzleHeader(
        $applicationName,
        $productName,
        $includeUtilityUsage,
        $isReportingGzipEnabled = null
    ) {
        $adsUtilities = $this->adsUtilityRegistry->popAllUtilities();

        return sprintf(
            '%s (%sApi-PHP, %s/%s, PHP/%s, %s%s%s)',
            $applicationName,
            $productName,
            $this->libraryMetadataProvider->getLibName(),
            $this->libraryMetadataProvider->getLibVersion(),
            PHP_VERSION,
            $this->formatGuzzleInfo(),
            $this->formatUtilUsages($adsUtilities, $includeUtilityUsage),
            $isReportingGzipEnabled === true ? ', gzip' : ''
        );
    }
public function formatApplicationNameForGuzzleHeader(
        $applicationName,
        $productName,
        $includeUtilityUsage,
        $isReportingGzipEnabled = null
    ) {
        $adsUtilities = $this->adsUtilityRegistry->popAllUtilities();

        return sprintf(
            '%s (%sApi-PHP, %s/%s, PHP/%s, %s%s%s)',
            $applicationName,
            $productName,
            $this->libraryMetadataProvider->getLibName(),
            $this->libraryMetadataProvider->getLibVersion(),
            PHP_VERSION,
            $this->formatGuzzleInfo(),
            $this->formatUtilUsages($adsUtilities, $includeUtilityUsage),
            $isReportingGzipEnabled === true ? ', gzip' : ''
        );
    }
public function formatApplicationNameForGuzzleHeader ( $ applicationName , $ productName , $ includeUtilityUsage , $ isReportingGzipEnabled = null ) { $ adsUtilities = $ this -> adsUtilityRegistry -> popAllUtilities ( ) ; return sprintf ( '%s (%sApi-PHP, %s/%s, PHP/%s, %s%s%s)' , $ applicationName , $ productName , $ this -> libraryMetadataProvider -> getLibName ( ) , $ this -> libraryMetadataProvider -> getLibVersion ( ) , PHP_VERSION , $ this -> formatGuzzleInfo ( ) , $ this -> formatUtilUsages ( $ adsUtilities , $ includeUtilityUsage ) , $ isReportingGzipEnabled === true ? ', gzip' : '' ) ; }
Formats an application name in a format standard to the ads libraries to
include in the Guzzle HTTP header.

@param string $applicationName the application name to format
@param string $productName the ads product API calls are being made against
@param boolean $includeUtilityUsage true if logging of utilities usages is
turned on
@param null|boolean $isReportingGzipEnabled true if the user agent should
include "gzip" to indicate that this request should be gzip-compressed
@return string the formatted application name
Formats an application name in a format standard to the ads libraries to include in the Guzzle HTTP header .