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

Static Public Member Functions

static getList (\DOMElement $parent)
 Get a list of Extensions in the given element. More...
 
static addList (\DOMElement $parent, array $extensions)
 Add a list of Extensions to the given element. More...
 

Detailed Description

Definition at line 19 of file Extensions.php.

Member Function Documentation

◆ addList()

static SAML2\XML\md\Extensions::addList ( \DOMElement  $parent,
array  $extensions 
)
static

Add a list of Extensions to the given element.

Parameters
\DOMElement$parentThe element we should add the extensions to.

Definition at line 70 of file Extensions.php.

References SAML2\Constants\NS_MD.

Referenced by SAML2\XML\md\EntitiesDescriptor\__construct(), SAML2\XML\md\EntityDescriptor\__construct(), SAML2\XML\md\Organization\toXML(), SAML2\XML\md\AffiliationDescriptor\toXML(), SAML2\XML\md\RoleDescriptor\toXML(), and SAML2\XML\md\ContactPerson\toXML().

71  {
72  if (empty($extensions)) {
73  return;
74  }
75 
76  $extElement = $parent->ownerDocument->createElementNS(Constants::NS_MD, 'md:Extensions');
77  $parent->appendChild($extElement);
78 
79  foreach ($extensions as $ext) {
80  $ext->toXML($extElement);
81  }
82  }
const NS_MD
The namespace for the SAML 2 metadata.
Definition: Constants.php:230
+ Here is the caller graph for this function:

◆ getList()

static SAML2\XML\md\Extensions::getList ( \DOMElement  $parent)
static

Get a list of Extensions in the given element.

Parameters
\DOMElement$parentThe element that may contain the md:Extensions element.
Returns
[] Array of extensions.

Definition at line 27 of file Extensions.php.

References $ret, SAML2\XML\shibmd\Scope\NS, SAML2\XML\mdattr\EntityAttributes\NS, and SAML2\Utils\xpQuery().

Referenced by SAML2\XML\md\Organization\__construct(), SAML2\XML\md\EntitiesDescriptor\__construct(), SAML2\XML\md\AffiliationDescriptor\__construct(), SAML2\XML\md\ContactPerson\__construct(), SAML2\XML\md\EntityDescriptor\__construct(), and SAML2\XML\md\RoleDescriptor\__construct().

28  {
29  $ret = array();
30  $supported = array(
31  Scope::NS => array(
32  'Scope' => '\SAML2\XML\shibmd\Scope',
33  ),
34  EntityAttributes::NS => array(
35  'EntityAttributes' => '\SAML2\XML\mdattr\EntityAttributes',
36  ),
37  MDRPI::NS_MDRPI => array(
38  'RegistrationInfo' => '\SAML2\XML\mdrpi\RegistrationInfo',
39  'PublicationInfo' => '\SAML2\XML\mdrpi\PublicationInfo',
40  ),
41  MDUI::NS => array(
42  'UIInfo' => '\SAML2\XML\mdui\UIInfo',
43  'DiscoHints' => '\SAML2\XML\mdui\DiscoHints',
44  ),
45  ALG::NS => array(
46  'DigestMethod' => '\SAML2\XML\alg\DigestMethod',
47  'SigningMethod' => '\SAML2\XML\alg\SigningMethod',
48  ),
49  );
50 
51  foreach (Utils::xpQuery($parent, './saml_metadata:Extensions/*') as $node) {
52  if (array_key_exists($node->namespaceURI, $supported) &&
53  array_key_exists($node->localName, $supported[$node->namespaceURI])
54  ) {
55  $ret[] = new $supported[$node->namespaceURI][$node->localName]($node);
56  } else {
57  $ret[] = new Chunk($node);
58  }
59  }
60 
61  return $ret;
62  }
const NS
The namespace used for the EntityAttributes extension.
static xpQuery(\DOMNode $node, $query)
Do an XPath query on an XML node.
Definition: Utils.php:191
$ret
Definition: parser.php:6
const NS
The namespace used for the Scope extension element.
Definition: Scope.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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