src/MediaServices/Templates/MediaServicesLicenseTemplateSerializer.php
public static function deserialize($template)
    {
        $xml = simplexml_load_string($template);
        $result = new PlayReadyLicenseResponseTemplate();

        // Validation
        if ($xml->getName() !== 'PlayReadyLicenseResponseTemplate') {
            throw new \RuntimeException("This is not a PlayReadyLicenseResponseTemplate, it is a '{$xml->getName()}'");
        }
        if (!isset($xml->LicenseTemplates)) {
            throw new \RuntimeException(
                "The PlayReadyLicenseResponseTemplate must contains an 'LicenseTemplates' element"
            );
        }

        // decoding
        $result->setLicenseTemplates(self::deserializeLicenseTemplates($xml->LicenseTemplates));

        if (isset($xml->ResponseCustomData)) {
            $result->setResponseCustomData((string) $xml->ResponseCustomData);
        }

        self::ValidateLicenseResponseTemplate($result);

        return $result;
    }
public static function deserialize($template)
    {
        $xml = simplexml_load_string($template);
        $result = new PlayReadyLicenseResponseTemplate();

        // Validation
        if ($xml->getName() !== 'PlayReadyLicenseResponseTemplate') {
            throw new \RuntimeException("This is not a PlayReadyLicenseResponseTemplate, it is a '{$xml->getName()}'");
        }
        if (!isset($xml->LicenseTemplates)) {
            throw new \RuntimeException(
                "The PlayReadyLicenseResponseTemplate must contains an 'LicenseTemplates' element"
            );
        }

        // decoding
        $result->setLicenseTemplates(self::deserializeLicenseTemplates($xml->LicenseTemplates));

        if (isset($xml->ResponseCustomData)) {
            $result->setResponseCustomData((string) $xml->ResponseCustomData);
        }

        self::ValidateLicenseResponseTemplate($result);

        return $result;
    }
public static function deserialize ( $ template ) { $ xml = simplexml_load_string ( $ template ) ; $ result = new PlayReadyLicenseResponseTemplate ( ) ; // Validation if ( $ xml -> getName ( ) !== 'PlayReadyLicenseResponseTemplate' ) { throw new \ RuntimeException ( "This is not a PlayReadyLicenseResponseTemplate, it is a '{$xml->getName()}'" ) ; } if ( ! isset ( $ xml -> LicenseTemplates ) ) { throw new \ RuntimeException ( "The PlayReadyLicenseResponseTemplate must contains an 'LicenseTemplates' element" ) ; } // decoding $ result -> setLicenseTemplates ( self :: deserializeLicenseTemplates ( $ xml -> LicenseTemplates ) ) ; if ( isset ( $ xml -> ResponseCustomData ) ) { $ result -> setResponseCustomData ( ( string ) $ xml -> ResponseCustomData ) ; } self :: ValidateLicenseResponseTemplate ( $ result ) ; return $ result ; }
Deserialize a PlayReadyLicenseResponseTemplate xml into a PlayReadyLicenseResponseTemplate object.

@param string $template Array containing values for object properties

@return PlayReadyLicenseResponseTemplate
Deserialize a PlayReadyLicenseResponseTemplate xml into a PlayReadyLicenseResponseTemplate object .