private function addConditions(DOMElement $root) : void
    {
        if ($this->audiences !== []) {
            $document = $root->ownerDocument;

            $conditions = $document->createElementNS(Constants::NS_SAML, 'saml:Conditions');
            $root->appendChild($conditions);

            $ar = $document->createElementNS(Constants::NS_SAML, 'saml:AudienceRestriction');
            $conditions->appendChild($ar);

            Utils::addStrings($ar, Constants::NS_SAML, 'saml:Audience', false, $this->getAudiences());
        }
    }
private function addConditions(DOMElement $root) : void
    {
        if ($this->audiences !== []) {
            $document = $root->ownerDocument;

            $conditions = $document->createElementNS(Constants::NS_SAML, 'saml:Conditions');
            $root->appendChild($conditions);

            $ar = $document->createElementNS(Constants::NS_SAML, 'saml:AudienceRestriction');
            $conditions->appendChild($ar);

            Utils::addStrings($ar, Constants::NS_SAML, 'saml:Audience', false, $this->getAudiences());
        }
    }
private function addConditions ( DOMElement $ root ) : void { if ( $ this -> audiences !== [ ] ) { $ document = $ root -> ownerDocument ; $ conditions = $ document -> createElementNS ( Constants :: NS_SAML , 'saml:Conditions' ) ; $ root -> appendChild ( $ conditions ) ; $ ar = $ document -> createElementNS ( Constants :: NS_SAML , 'saml:AudienceRestriction' ) ; $ conditions -> appendChild ( $ ar ) ; Utils :: addStrings ( $ ar , Constants :: NS_SAML , 'saml:Audience' , false , $ this -> getAudiences ( ) ) ; } }
Add a Conditions-node to the request.

@param \DOMElement $root The request element we should add the conditions to.
@return void
Add a Conditions - node to the request .