SAML2\XML\saml\NameIDType::__construct PHP Method

__construct() public method

Initialize a saml:NameIDType, either from scratch or from an existing \DOMElement.
public __construct ( DOMElement $xml = null )
$xml DOMElement The XML element we should load, if any.
    public function __construct(\DOMElement $xml = null)
    {
        parent::__construct($xml);
        if ($xml === null) {
            return;
        }
        if ($xml->hasAttribute('Format')) {
            $this->Format = $xml->getAttribute('Format');
        }
        if ($xml->hasAttribute('SPProvidedID')) {
            $this->SPProvidedID = $xml->getAttribute('SPProvidedID');
        }
        $this->value = trim($xml->textContent);
    }