src/Google/AdsApi/AdWords/AdWordsHeaderHandler.php
private function createSoapHeaderObject(
        AdsServiceDescriptor $serviceDescriptor
    ) {
        // The SOAP header object is in the same base namespace (without the group)
        // as the AdWords service we are generating headers for.
        $reflectionClass =
            new ReflectionClass($serviceDescriptor->getServiceClass());
        $namespaceParts =
            explode('\\', trim($reflectionClass->getNamespaceName(), '\\'));
        // Remove the group.
        array_pop($namespaceParts);
        $soapHeaderClassName = sprintf(
            '%s\\%s',
            implode('\\', $namespaceParts),
            self::DEFAULT_SOAP_HEADER_CLASS_NAME
        );

        return $this->reflection->createInstance($soapHeaderClassName);
    }
private function createSoapHeaderObject(
        AdsServiceDescriptor $serviceDescriptor
    ) {
        // The SOAP header object is in the same base namespace (without the group)
        // as the AdWords service we are generating headers for.
        $reflectionClass =
            new ReflectionClass($serviceDescriptor->getServiceClass());
        $namespaceParts =
            explode('\\', trim($reflectionClass->getNamespaceName(), '\\'));
        // Remove the group.
        array_pop($namespaceParts);
        $soapHeaderClassName = sprintf(
            '%s\\%s',
            implode('\\', $namespaceParts),
            self::DEFAULT_SOAP_HEADER_CLASS_NAME
        );

        return $this->reflection->createInstance($soapHeaderClassName);
    }
private function createSoapHeaderObject ( AdsServiceDescriptor $ serviceDescriptor ) { // The SOAP header object is in the same base namespace (without the group) // as the AdWords service we are generating headers for. $ reflectionClass = new ReflectionClass ( $ serviceDescriptor -> getServiceClass ( ) ) ; $ namespaceParts = explode ( '\\' , trim ( $ reflectionClass -> getNamespaceName ( ) , '\\' ) ) ; // Remove the group. array_pop ( $ namespaceParts ) ; $ soapHeaderClassName = sprintf ( '%s\\%s' , implode ( '\\' , $ namespaceParts ) , self :: DEFAULT_SOAP_HEADER_CLASS_NAME ) ; return $ this -> reflection -> createInstance ( $ soapHeaderClassName ) ; }
Creates a new instance of the SOAP header object used by the AdWords API.
Creates a new instance of the SOAP header object used by the AdWords API .