{"site-control"})) { $sc = $xml->{"site-control"}; foreach ($sc->attributes() as $k => $v) { if ($k === 'permitted-cross-domain-policies') { $conf['site-control'] = (string) $v; } } } if (isset($xml->{"allow-access-from"})) { if (count($xml->{"allow-access-from"}) > 0) { $conf['allow-access-from'] = array(); foreach ($xml->{"allow-access-from"} as $el) { $opt = array(); foreach ($el->attributes() as $k => $v) { $opt[$k] = (string) $v; } $conf['allow-access-from'][] = $opt; } } } if (isset($xml->{"signatory"})) { if (count($xml->{"signatory"}) > 0) { $conf['allow-access-from-identity'] = array(); foreach ($xml->{"signatory"} as $el) { if (isset($el->{"certificate"})) { $c = array(); foreach ($el->{"certificate"}->attributes() as $k => $v) { $c[$k] = (string) $v; } $conf['allow-access-from-identity'][] = $c; } } } } if (isset($xml->{"allow-http-request-headers-from"})) { if (count($xml->{"allow-http-request-headers-from"}) > 0) { $conf['allow-http-request-headers-from'] = array(); foreach ($xml->{"allow-http-request-headers-from"} as $el) { $opt = array(); foreach ($el->attributes() as $k => $v) { $opt[$k] = (string) $v; } $conf['allow-http-request-headers-from'][] = $opt; } } } return $conf; } }