for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace SimpleSAML\SAML11\XML\samlp;
use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\StringElementTrait;
/**
* Class representing a samlp:StatusMessage element.
*
* @package simplesaml/saml11
*/
final class StatusMessage extends AbstractSamlpElement
{
use StringElementTrait;
* @param string $content
public function __construct(string $content)
$this->setContent($content);
}
* Validate the content of the element.
* @param string $content The value to go in the XML textContent
* @throws \Exception on failure
* @return void
protected function validateContent(string $content): void
Assert::notWhitespaceOnly($content);
* Convert XML into an StatusMessage
* @param \DOMElement $xml The XML element we should load
* @return static
* @throws \SimpleSAML\XML\Exception\InvalidDOMElementException
* If the qualified name of the supplied element is wrong
public static function fromXML(DOMElement $xml): static
Assert::same($xml->localName, 'StatusMessage', InvalidDOMElementException::class);
Assert::same($xml->namespaceURI, StatusMessage::NS, InvalidDOMElementException::class);
return new static($xml->textContent);