ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SAML2\XML\shibmd\Scope Class Reference
+ Collaboration diagram for SAML2\XML\shibmd\Scope:

Public Member Functions

 __construct (\DOMElement $xml=null)
 Create a Scope. More...
 
 toXML (\DOMElement $parent)
 Convert this Scope to XML. More...
 

Data Fields

const NS = 'urn:mace:shibboleth:metadata:1.0'
 The namespace used for the Scope extension element. More...
 
 $scope
 
 $regexp = false
 

Detailed Description

Definition at line 13 of file Scope.php.

Constructor & Destructor Documentation

◆ __construct()

SAML2\XML\shibmd\Scope::__construct ( \DOMElement  $xml = null)

Create a Scope.

Parameters
\DOMElement | null$xmlThe XML element we should load.

Definition at line 39 of file Scope.php.

References $xml, and SAML2\Utils\parseBoolean().

40  {
41  if ($xml === null) {
42  return;
43  }
44 
45  $this->scope = $xml->textContent;
46  $this->regexp = Utils::parseBoolean($xml, 'regexp', false);
47  }
static parseBoolean(\DOMElement $node, $attributeName, $default=null)
Parse a boolean attribute.
Definition: Utils.php:276
+ Here is the call graph for this function:

Member Function Documentation

◆ toXML()

SAML2\XML\shibmd\Scope::toXML ( \DOMElement  $parent)

Convert this Scope to XML.

Parameters
\DOMElement$parentThe element we should append this Scope to.
Returns

Definition at line 55 of file Scope.php.

References SAML2\XML\shibmd\Scope\NS.

56  {
57  assert(is_string($this->scope));
58  assert(is_bool($this->regexp) || is_null($this->regexp));
59 
60  $doc = $parent->ownerDocument;
61 
62  $e = $doc->createElementNS(Scope::NS, 'shibmd:Scope');
63  $parent->appendChild($e);
64 
65  $e->appendChild($doc->createTextNode($this->scope));
66 
67  if ($this->regexp === true) {
68  $e->setAttribute('regexp', 'true');
69  } else {
70  $e->setAttribute('regexp', 'false');
71  }
72 
73  return $e;
74  }
const NS
The namespace used for the Scope extension element.
Definition: Scope.php:18

Field Documentation

◆ $regexp

SAML2\XML\shibmd\Scope::$regexp = false

Definition at line 32 of file Scope.php.

◆ $scope

SAML2\XML\shibmd\Scope::$scope

Definition at line 25 of file Scope.php.

◆ NS

const SAML2\XML\shibmd\Scope::NS = 'urn:mace:shibboleth:metadata:1.0'

The namespace used for the Scope extension element.

Definition at line 18 of file Scope.php.

Referenced by SAML2\XML\md\Extensions\getList(), and SAML2\XML\shibmd\Scope\toXML().


The documentation for this class was generated from the following file: