ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SAML2\XML\alg\DigestMethod Class Reference
+ Collaboration diagram for SAML2\XML\alg\DigestMethod:

Public Member Functions

 __construct (\DOMElement $xml=null)
 Create/parse an alg:DigestMethod element. More...
 
 toXML (\DOMElement $parent)
 Convert this element to XML. More...
 

Data Fields

 $Algorithm
 

Detailed Description

Definition at line 12 of file DigestMethod.php.

Constructor & Destructor Documentation

◆ __construct()

SAML2\XML\alg\DigestMethod::__construct ( \DOMElement  $xml = null)

Create/parse an alg:DigestMethod element.

Parameters
\DOMElement | null$xmlThe XML element we should load or null to create a new one from scratch.
Exceptions

Definition at line 29 of file DigestMethod.php.

References $xml.

30  {
31  if ($xml === null) {
32  return;
33  }
34 
35  if (!$xml->hasAttribute('Algorithm')) {
36  throw new \Exception('Missing required attribute "Algorithm" in alg:DigestMethod element.');
37  }
38  $this->Algorithm = $xml->getAttribute('Algorithm');
39  }
$xml
Definition: metadata.php:240

Member Function Documentation

◆ toXML()

SAML2\XML\alg\DigestMethod::toXML ( \DOMElement  $parent)

Convert this element to XML.

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

Definition at line 48 of file DigestMethod.php.

References SAML2\XML\alg\Common\NS.

49  {
50  assert(is_string($this->Algorithm));
51 
52  $doc = $parent->ownerDocument;
53  $e = $doc->createElementNS(Common::NS, 'alg:DigestMethod');
54  $parent->appendChild($e);
55  $e->setAttribute('Algorithm', $this->Algorithm);
56 
57  return $e;
58  }

Field Documentation

◆ $Algorithm

SAML2\XML\alg\DigestMethod::$Algorithm

Definition at line 19 of file DigestMethod.php.


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