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

Public Member Functions

 __construct (\DOMElement $xml=null)
 Initialize an EntitiesDescriptor. More...
 
- Public Member Functions inherited from SAML2\SignedElementHelper
 addValidator ($function, $data)
 Add a method for validating this element. More...
 
 validate (XMLSecurityKey $key)
 Validate this element against a public key. More...
 
 getSignatureKey ()
 Retrieve the private key we should use to sign the message. More...
 
 setSignatureKey (XMLSecurityKey $signatureKey=null)
 Set the private key we should use to sign the message. More...
 
 setCertificates (array $certificates)
 Set the certificates that should be included in the message. More...
 
 getCertificates ()
 Retrieve the certificates that are included in the message. More...
 
 getValidatingCertificates ()
 Retrieve certificates that sign this element. More...
 

Data Fields

 $ID
 
 $validUntil
 
 $cacheDuration
 
 $Name
 
 $Extensions = array()
 
 $children = array()
 

Additional Inherited Members

- Protected Member Functions inherited from SAML2\SignedElementHelper
 __construct (\DOMElement $xml=null)
 Initialize the helper class. More...
 
 signElement (\DOMElement $root, \DOMElement $insertBefore=null)
 Sign the given XML element. More...
 

Detailed Description

Definition at line 15 of file EntitiesDescriptor.php.

Constructor & Destructor Documentation

◆ __construct()

SAML2\XML\md\EntitiesDescriptor::__construct ( \DOMElement  $xml = null)

Initialize an EntitiesDescriptor.

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

Definition at line 66 of file EntitiesDescriptor.php.

References $xml, SAML2\XML\md\Extensions\addList(), SAML2\DOMDocumentFactory\create(), SAML2\XML\md\Extensions\getList(), SAML2\Constants\NS_MD, SAML2\SignedElementHelper\signElement(), SAML2\Utils\xpQuery(), and SAML2\Utils\xsDateTimeToTimestamp().

67  {
68  parent::__construct($xml);
69 
70  if ($xml === null) {
71  return;
72  }
73 
74  if ($xml->hasAttribute('ID')) {
75  $this->ID = $xml->getAttribute('ID');
76  }
77  if ($xml->hasAttribute('validUntil')) {
78  $this->validUntil = Utils::xsDateTimeToTimestamp($xml->getAttribute('validUntil'));
79  }
80  if ($xml->hasAttribute('cacheDuration')) {
81  $this->cacheDuration = $xml->getAttribute('cacheDuration');
82  }
83  if ($xml->hasAttribute('Name')) {
84  $this->Name = $xml->getAttribute('Name');
85  }
86 
87  $this->Extensions = Extensions::getList($xml);
88 
89  foreach (Utils::xpQuery($xml, './saml_metadata:EntityDescriptor|./saml_metadata:EntitiesDescriptor') as $node) {
90  if ($node->localName === 'EntityDescriptor') {
91  $this->children[] = new EntityDescriptor($node);
92  } else {
93  $this->children[] = new EntitiesDescriptor($node);
94  }
95  }
96  }
static xpQuery(\DOMNode $node, $query)
Do an XPath query on an XML node.
Definition: Utils.php:191
static xsDateTimeToTimestamp($time)
This function converts a SAML2 timestamp on the form yyyy-mm-ddThh:mm:ss(.s+)?Z to a UNIX timestamp...
Definition: Utils.php:721
static getList(\DOMElement $parent)
Get a list of Extensions in the given element.
Definition: Extensions.php:27
+ Here is the call graph for this function:

Field Documentation

◆ $cacheDuration

SAML2\XML\md\EntitiesDescriptor::$cacheDuration

Definition at line 36 of file EntitiesDescriptor.php.

◆ $children

SAML2\XML\md\EntitiesDescriptor::$children = array()

Definition at line 59 of file EntitiesDescriptor.php.

◆ $Extensions

SAML2\XML\md\EntitiesDescriptor::$Extensions = array()

Definition at line 52 of file EntitiesDescriptor.php.

◆ $ID

SAML2\XML\md\EntitiesDescriptor::$ID

Definition at line 22 of file EntitiesDescriptor.php.

◆ $Name

SAML2\XML\md\EntitiesDescriptor::$Name

Definition at line 43 of file EntitiesDescriptor.php.

◆ $validUntil

SAML2\XML\md\EntitiesDescriptor::$validUntil

Definition at line 29 of file EntitiesDescriptor.php.


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