Beispiel #1
0
 public function toXML(\DOMElement $parent)
 {
     $xml = parent::toXML($parent);
     $xml->setAttributeNS(Constants::NS_XSI, 'xsi:type', 'myns:MyElement');
     $xml->setAttributeNS('http://example.org/mynsdefinition', 'myns:tmp', 'tmp');
     $xml->removeAttributeNS('http://example.org/mynsdefinition', 'tmp');
     return $xml;
 }
 /**
  * Add this IDPSSODescriptor to an EntityDescriptor.
  *
  * @param \DOMElement $parent The EntityDescriptor we should append this AuthnAuthorityDescriptor to.
  * @return \DOMElement
  */
 public function toXML(\DOMElement $parent)
 {
     assert('is_array($this->AuthnQueryService)');
     assert('!empty($this->AuthnQueryService)');
     assert('is_array($this->AssertionIDRequestService)');
     assert('is_array($this->NameIDFormat)');
     $e = parent::toXML($parent);
     foreach ($this->AuthnQueryService as $ep) {
         $ep->toXML($e, 'md:AuthnQueryService');
     }
     foreach ($this->AssertionIDRequestService as $ep) {
         $ep->toXML($e, 'md:AssertionIDRequestService');
     }
     Utils::addStrings($e, Constants::NS_MD, 'md:NameIDFormat', false, $this->NameIDFormat);
     return $e;
 }
Beispiel #3
0
 /**
  * Add this SSODescriptorType to an EntityDescriptor.
  *
  * @param  \DOMElement $parent The EntityDescriptor we should append this SSODescriptorType to.
  * @return \DOMElement The generated SSODescriptor DOMElement.
  */
 protected function toXML(\DOMElement $parent)
 {
     assert('is_array($this->ArtifactResolutionService)');
     assert('is_array($this->SingleLogoutService)');
     assert('is_array($this->ManageNameIDService)');
     assert('is_array($this->NameIDFormat)');
     $e = parent::toXML($parent);
     foreach ($this->ArtifactResolutionService as $ep) {
         $ep->toXML($e, 'md:ArtifactResolutionService');
     }
     foreach ($this->SingleLogoutService as $ep) {
         $ep->toXML($e, 'md:SingleLogoutService');
     }
     foreach ($this->ManageNameIDService as $ep) {
         $ep->toXML($e, 'md:ManageNameIDService');
     }
     Utils::addStrings($e, Constants::NS_MD, 'md:NameIDFormat', false, $this->NameIDFormat);
     return $e;
 }
 /**
  * Initialize an unknown RoleDescriptor.
  *
  * @param \DOMElement $xml The XML element we should load.
  */
 public function __construct(\DOMElement $xml)
 {
     parent::__construct('md:RoleDescriptor', $xml);
     $this->xml = new Chunk($xml);
 }