public function toUnsignedXML() : DOMElement
    {
        $root = parent::toUnsignedXML();

        if ($this->inResponseTo !== null) {
            $root->setAttribute('InResponseTo', $this->inResponseTo);
        }

        $status = $this->document->createElementNS(Constants::NS_SAMLP, 'Status');
        $root->appendChild($status);

        $statusCode = $this->document->createElementNS(Constants::NS_SAMLP, 'StatusCode');
        $statusCode->setAttribute('Value', $this->status['Code']);
        $status->appendChild($statusCode);

        if (!is_null($this->status['SubCode'])) {
            $subStatusCode = $this->document->createElementNS(Constants::NS_SAMLP, 'StatusCode');
            $subStatusCode->setAttribute('Value', $this->status['SubCode']);
            $statusCode->appendChild($subStatusCode);
        }

        if (!is_null($this->status['Message'])) {
            Utils::addString($status, Constants::NS_SAMLP, 'StatusMessage', $this->status['Message']);
        }

        return $root;
    }
public function toUnsignedXML() : DOMElement
    {
        $root = parent::toUnsignedXML();

        if ($this->inResponseTo !== null) {
            $root->setAttribute('InResponseTo', $this->inResponseTo);
        }

        $status = $this->document->createElementNS(Constants::NS_SAMLP, 'Status');
        $root->appendChild($status);

        $statusCode = $this->document->createElementNS(Constants::NS_SAMLP, 'StatusCode');
        $statusCode->setAttribute('Value', $this->status['Code']);
        $status->appendChild($statusCode);

        if (!is_null($this->status['SubCode'])) {
            $subStatusCode = $this->document->createElementNS(Constants::NS_SAMLP, 'StatusCode');
            $subStatusCode->setAttribute('Value', $this->status['SubCode']);
            $statusCode->appendChild($subStatusCode);
        }

        if (!is_null($this->status['Message'])) {
            Utils::addString($status, Constants::NS_SAMLP, 'StatusMessage', $this->status['Message']);
        }

        return $root;
    }
public function toUnsignedXML ( ) : DOMElement { $ root = parent :: toUnsignedXML ( ) ; if ( $ this -> inResponseTo !== null ) { $ root -> setAttribute ( 'InResponseTo' , $ this -> inResponseTo ) ; } $ status = $ this -> document -> createElementNS ( Constants :: NS_SAMLP , 'Status' ) ; $ root -> appendChild ( $ status ) ; $ statusCode = $ this -> document -> createElementNS ( Constants :: NS_SAMLP , 'StatusCode' ) ; $ statusCode -> setAttribute ( 'Value' , $ this -> status [ 'Code' ] ) ; $ status -> appendChild ( $ statusCode ) ; if ( ! is_null ( $ this -> status [ 'SubCode' ] ) ) { $ subStatusCode = $ this -> document -> createElementNS ( Constants :: NS_SAMLP , 'StatusCode' ) ; $ subStatusCode -> setAttribute ( 'Value' , $ this -> status [ 'SubCode' ] ) ; $ statusCode -> appendChild ( $ subStatusCode ) ; } if ( ! is_null ( $ this -> status [ 'Message' ] ) ) { Utils :: addString ( $ status , Constants :: NS_SAMLP , 'StatusMessage' , $ this -> status [ 'Message' ] ) ; } return $ root ; }
Convert status response message to an XML element.

@return \DOMElement This status response.
Convert status response message to an XML element .