ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Extensions.php
Go to the documentation of this file.
1<?php
2
4
8
15{
22 public static function getList(\DOMElement $parent)
23 {
24 $ret = array();
25 foreach (Utils::xpQuery($parent, './saml_protocol:Extensions/*') as $node) {
26 $ret[] = new Chunk($node);
27 }
28
29 return $ret;
30 }
31
38 public static function addList(\DOMElement $parent, array $extensions)
39 {
40 if (empty($extensions)) {
41 return;
42 }
43
44 $extElement = $parent->ownerDocument->createElementNS(Constants::NS_SAMLP, 'samlp:Extensions');
45 $parent->appendChild($extElement);
46
47 foreach ($extensions as $ext) {
48 $ext->toXML($extElement);
49 }
50 }
51}
An exception for terminatinating execution or to throw for unit testing.
const NS_SAMLP
The namespace for the SAML 2 protocol.
Definition: Constants.php:220
static xpQuery(\DOMNode $node, $query)
Do an XPath query on an XML node.
Definition: Utils.php:191
static getList(\DOMElement $parent)
Get a list of Extensions in the given element.
Definition: Extensions.php:22
static addList(\DOMElement $parent, array $extensions)
Add a list of Extensions to the given element.
Definition: Extensions.php:38
$ret
Definition: parser.php:6