for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace SimpleSAML\WSSecurity\XML\sp_200702;
use DOMElement;
use SimpleSAML\WSSecurity\Assert\Assert;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use function sprintf;
/**
* Class representing WS security policy EmptyType.
*
* @package simplesamlphp/ws-security
*/
abstract class AbstractEmptyType extends AbstractSpElement
{
* AbstractEmptyType constructor.
final public function __construct()
}
* Initialize an EmptyType.
* Note: this method cannot be used when extending this class, if the constructor has a different signature.
* @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
$qualifiedName = static::getClassName(static::class);
Assert::eq(
$xml->localName,
$qualifiedName,
sprintf('Unexpected name for EmptyType: %s. Expected: %s.', $xml->localName, $qualifiedName),
InvalidDOMElementException::class,
);
return new static();
* Convert this element to XML.
* @param \DOMElement|null $parent The element we should append this element to.
* @return \DOMElement
public function toXML(?DOMElement $parent = null): DOMElement
return $this->instantiateParentElement($parent);