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

Public Member Functions

 __construct (\DOMElement $xml=null)
 Initialize an Organization element. More...
 
 toXML (\DOMElement $parent)
 Convert this Organization to XML. More...
 

Data Fields

 $Extensions = array()
 
 $OrganizationName = array()
 
 $OrganizationDisplayName = array()
 
 $OrganizationURL = array()
 

Detailed Description

Definition at line 13 of file Organization.php.

Constructor & Destructor Documentation

◆ __construct()

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

Initialize an Organization element.

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

Definition at line 50 of file Organization.php.

References $xml, array, SAML2\Utils\extractLocalizedStrings(), SAML2\XML\md\Extensions\getList(), and SAML2\Constants\NS_MD.

51  {
52  if ($xml === null) {
53  return;
54  }
55 
56  $this->Extensions = Extensions::getList($xml);
57 
58  $this->OrganizationName = Utils::extractLocalizedStrings($xml, Constants::NS_MD, 'OrganizationName');
59  if (empty($this->OrganizationName)) {
60  $this->OrganizationName = array('invalid' => '');
61  }
62 
63  $this->OrganizationDisplayName = Utils::extractLocalizedStrings($xml, Constants::NS_MD, 'OrganizationDisplayName');
64  if (empty($this->OrganizationDisplayName)) {
65  $this->OrganizationDisplayName = array('invalid' => '');
66  }
67 
68  $this->OrganizationURL = Utils::extractLocalizedStrings($xml, Constants::NS_MD, 'OrganizationURL');
69  if (empty($this->OrganizationURL)) {
70  $this->OrganizationURL = array('invalid' => '');
71  }
72  }
static extractLocalizedStrings(\DOMElement $parent, $namespaceURI, $localName)
Extract localized strings from a set of nodes.
Definition: Utils.php:580
$xml
Definition: metadata.php:240
const NS_MD
The namespace for the SAML 2 metadata.
Definition: Constants.php:225
Create styles array
The data for the language used.
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:

Member Function Documentation

◆ toXML()

SAML2\XML\md\Organization::toXML ( \DOMElement  $parent)

Convert this Organization to XML.

Parameters
\DOMElement$parentThe element we should add this organization to.
Returns
This Organization-element.

Definition at line 80 of file Organization.php.

References SAML2\XML\md\Extensions\addList(), SAML2\Utils\addStrings(), and SAML2\Constants\NS_MD.

81  {
82  assert(is_array($this->Extensions));
83  assert(is_array($this->OrganizationName));
84  assert(!empty($this->OrganizationName));
85  assert(is_array($this->OrganizationDisplayName));
86  assert(!empty($this->OrganizationDisplayName));
87  assert(is_array($this->OrganizationURL));
88  assert(!empty($this->OrganizationURL));
89 
90  $doc = $parent->ownerDocument;
91 
92  $e = $doc->createElementNS(Constants::NS_MD, 'md:Organization');
93  $parent->appendChild($e);
94 
95  Extensions::addList($e, $this->Extensions);
96 
97  Utils::addStrings($e, Constants::NS_MD, 'md:OrganizationName', true, $this->OrganizationName);
98  Utils::addStrings($e, Constants::NS_MD, 'md:OrganizationDisplayName', true, $this->OrganizationDisplayName);
99  Utils::addStrings($e, Constants::NS_MD, 'md:OrganizationURL', true, $this->OrganizationURL);
100 
101  return $e;
102  }
static addStrings(\DOMElement $parent, $namespace, $name, $localized, array $values)
Append string elements.
Definition: Utils.php:659
const NS_MD
The namespace for the SAML 2 metadata.
Definition: Constants.php:225
static addList(\DOMElement $parent, array $extensions)
Add a list of Extensions to the given element.
Definition: Extensions.php:70
+ Here is the call graph for this function:

Field Documentation

◆ $Extensions

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

Definition at line 22 of file Organization.php.

◆ $OrganizationDisplayName

SAML2\XML\md\Organization::$OrganizationDisplayName = array()

Definition at line 36 of file Organization.php.

◆ $OrganizationName

SAML2\XML\md\Organization::$OrganizationName = array()

Definition at line 29 of file Organization.php.

◆ $OrganizationURL

SAML2\XML\md\Organization::$OrganizationURL = array()

Definition at line 43 of file Organization.php.


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