18 const NS =
'urn:mace:shibboleth:metadata:1.0';
45 $this->scope =
$xml->textContent;
57 assert(is_string($this->scope));
58 assert(is_bool($this->regexp) || is_null($this->regexp));
60 $doc = $parent->ownerDocument;
62 $e = $doc->createElementNS(
Scope::NS,
'shibmd:Scope');
63 $parent->appendChild($e);
65 $e->appendChild($doc->createTextNode($this->scope));
67 if ($this->regexp ===
true) {
68 $e->setAttribute(
'regexp',
'true');
70 $e->setAttribute(
'regexp',
'false');
static parseBoolean(\DOMElement $node, $attributeName, $default=null)
Parse a boolean attribute.
__construct(\DOMElement $xml=null)
Create a Scope.
const NS
The namespace used for the Scope extension element.
toXML(\DOMElement $parent)
Convert this Scope to XML.