public function IDPMetadataReader::__construct in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7
File
- includes/
MetadataReader.php, line 9
Class
Code
public function __construct(DOMNode $xml = NULL) {
$this->identityProviders = array();
$this->serviceProviders = array();
$entityDescriptors = Utilities::xpQuery($xml, './saml_metadata:EntityDescriptor');
foreach ($entityDescriptors as $entityDescriptor) {
$idpSSODescriptor = Utilities::xpQuery($entityDescriptor, './saml_metadata:IDPSSODescriptor');
if (isset($idpSSODescriptor) && !empty($idpSSODescriptor)) {
array_push($this->identityProviders, new IdentityProviders($entityDescriptor));
}
//TODO: add sp descriptor
}
}