public function unserialize($serialized)
{
$session = unserialize($serialized);
if (is_array($session)) {
foreach ($session as $k => $v) {
$this->{$k} = $v;
}
}
// look for any raw attributes and load them in the 'Attributes' array
foreach ($this->authData as $authority => $parameters) {
if (!array_key_exists('RawAttributes', $parameters)) {
continue;
}
foreach ($parameters['RawAttributes'] as $attribute => $values) {
foreach ($values as $idx => $value) {
// this should be originally a DOMNodeList
/* @var \SAML2\XML\saml\AttributeValue $value */
$this->authData[$authority]['Attributes'][$attribute][$idx] = $value->element->childNodes;
}
}
}
}