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

Public Member Functions

 __construct (\DOMElement $xml=null)
 Initialize an RequestedAttribute. More...
 
 toXML (\DOMElement $parent)
 Convert this RequestedAttribute to XML. More...
 
- Public Member Functions inherited from SAML2\XML\saml\Attribute
 __construct (\DOMElement $xml=null)
 Initialize an Attribute. More...
 
 toXML (\DOMElement $parent)
 Convert this Attribute to XML. More...
 

Data Fields

 $isRequired = null
 
- Data Fields inherited from SAML2\XML\saml\Attribute
 $Name
 
 $NameFormat
 
 $FriendlyName = null
 
 $AttributeValue = array()
 

Additional Inherited Members

- Protected Member Functions inherited from SAML2\XML\saml\Attribute
 toXMLInternal (\DOMElement $parent, $namespace, $name)
 Internal implementation of toXML. More...
 

Detailed Description

Definition at line 14 of file RequestedAttribute.php.

Constructor & Destructor Documentation

◆ __construct()

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

Initialize an RequestedAttribute.

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

Definition at line 28 of file RequestedAttribute.php.

References $xml, and SAML2\Utils\parseBoolean().

29  {
30  parent::__construct($xml);
31 
32  if ($xml === null) {
33  return;
34  }
35 
36  $this->isRequired = Utils::parseBoolean($xml, 'isRequired', null);
37  }
$xml
Definition: metadata.php:240
static parseBoolean(\DOMElement $node, $attributeName, $default=null)
Parse a boolean attribute.
Definition: Utils.php:276
+ Here is the call graph for this function:

Member Function Documentation

◆ toXML()

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

Convert this RequestedAttribute to XML.

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

Definition at line 45 of file RequestedAttribute.php.

References SAML2\Constants\NS_MD, and SAML2\XML\saml\Attribute\toXMLInternal().

46  {
47  assert(is_bool($this->isRequired) || is_null($this->isRequired));
48 
49  $e = $this->toXMLInternal($parent, Constants::NS_MD, 'md:RequestedAttribute');
50 
51  if ($this->isRequired === true) {
52  $e->setAttribute('isRequired', 'true');
53  } elseif ($this->isRequired === false) {
54  $e->setAttribute('isRequired', 'false');
55  }
56 
57  return $e;
58  }
const NS_MD
The namespace for the SAML 2 metadata.
Definition: Constants.php:225
toXMLInternal(\DOMElement $parent, $namespace, $name)
Internal implementation of toXML.
Definition: Attribute.php:84
+ Here is the call graph for this function:

Field Documentation

◆ $isRequired

SAML2\XML\md\RequestedAttribute::$isRequired = null

Definition at line 21 of file RequestedAttribute.php.


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