50 if (!
$xml->hasAttribute(
'registrationAuthority')) {
51 throw new \Exception(
'Missing required attribute "registrationAuthority" in mdrpi:RegistrationInfo element.');
53 $this->registrationAuthority =
$xml->getAttribute(
'registrationAuthority');
55 if (
$xml->hasAttribute(
'registrationInstant')) {
70 assert(is_string($this->registrationAuthority));
71 assert(is_int($this->registrationInstant) || is_null($this->registrationInstant));
72 assert(is_array($this->RegistrationPolicy));
74 if (empty($this->registrationAuthority)) {
75 throw new \Exception(
'Missing required registration authority.');
78 $doc = $parent->ownerDocument;
81 $parent->appendChild($e);
83 $e->setAttribute(
'registrationAuthority', $this->registrationAuthority);
85 if ($this->registrationInstant !== null) {
86 $e->setAttribute(
'registrationInstant', gmdate(
'Y-m-d\TH:i:s\Z', $this->registrationInstant));
static extractLocalizedStrings(\DOMElement $parent, $namespaceURI, $localName)
Extract localized strings from a set of nodes.
toXML(\DOMElement $parent)
Convert this element to XML.
static addStrings(\DOMElement $parent, $namespace, $name, $localized, array $values)
Append string elements.
Create styles array
The data for the language used.
static xsDateTimeToTimestamp($time)
This function converts a SAML2 timestamp on the form yyyy-mm-ddThh:mm:ss(.s+)?Z to a UNIX timestamp...
__construct(\DOMElement $xml=null)
Create/parse a mdrpi:RegistrationInfo element.