src/MediaServices/Templates/MediaServicesLicenseTemplateSerializer.php
public static function serialize($template)
    {
        self::ValidateLicenseResponseTemplate($template);

        $writer = new \XMLWriter();

        $writer->openMemory();
        $writer->startElementNS(null, 'PlayReadyLicenseResponseTemplate', Resources::PRL_XML_NAMESPACE);
        $writer->writeAttributeNS('xmlns', 'i', null, Resources::XSI_XML_NAMESPACE);

        self::serializeLicenseTemplates($writer, $template->getLicenseTemplates());
        $writer->writeElement('ResponseCustomData', $template->getResponseCustomData());

        $writer->endElement();

        return $writer->outputMemory();
    }
public static function serialize($template)
    {
        self::ValidateLicenseResponseTemplate($template);

        $writer = new \XMLWriter();

        $writer->openMemory();
        $writer->startElementNS(null, 'PlayReadyLicenseResponseTemplate', Resources::PRL_XML_NAMESPACE);
        $writer->writeAttributeNS('xmlns', 'i', null, Resources::XSI_XML_NAMESPACE);

        self::serializeLicenseTemplates($writer, $template->getLicenseTemplates());
        $writer->writeElement('ResponseCustomData', $template->getResponseCustomData());

        $writer->endElement();

        return $writer->outputMemory();
    }
public static function serialize ( $ template ) { self :: ValidateLicenseResponseTemplate ( $ template ) ; $ writer = new \ XMLWriter ( ) ; $ writer -> openMemory ( ) ; $ writer -> startElementNS ( null , 'PlayReadyLicenseResponseTemplate' , Resources :: PRL_XML_NAMESPACE ) ; $ writer -> writeAttributeNS ( 'xmlns' , 'i' , null , Resources :: XSI_XML_NAMESPACE ) ; self :: serializeLicenseTemplates ( $ writer , $ template -> getLicenseTemplates ( ) ) ; $ writer -> writeElement ( 'ResponseCustomData' , $ template -> getResponseCustomData ( ) ) ; $ writer -> endElement ( ) ; return $ writer -> outputMemory ( ) ; }
Serialize a PlayReadyLicenseResponseTemplate object into a PlayReadyLicenseResponseTemplate XML.

@param PlayReadyLicenseResponseTemplate $template

@return string The PlayReadyLicenseResponseTemplate XML
Serialize a PlayReadyLicenseResponseTemplate object into a PlayReadyLicenseResponseTemplate XML .