Definition at line 9 of file DOMDocumentFactory.php.
◆ __construct()
SAML2\DOMDocumentFactory::__construct |
( |
| ) |
|
|
private |
◆ create()
static SAML2\DOMDocumentFactory::create |
( |
| ) |
|
|
static |
◆ fromFile()
static SAML2\DOMDocumentFactory::fromFile |
( |
|
$file | ) |
|
|
static |
- Parameters
-
- Returns
Definition at line 66 of file DOMDocumentFactory.php.
References $file, and $xml.
68 if (!is_string(
$file)) {
72 if (!is_file(
$file)) {
76 if (!is_readable(
$file)) {
85 'Contents of readable file "%s" could not be gotten',
90 if (trim(
$xml) ===
'') {
94 return static::fromString(
$xml);
static invalidType($expected, $parameter)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
◆ fromString()
static SAML2\DOMDocumentFactory::fromString |
( |
|
$xml | ) |
|
|
static |
- Parameters
-
- Returns
Definition at line 20 of file DOMDocumentFactory.php.
References $error, $options, $xml, and defined.
Referenced by sspmod_adfs_XMLSecurityDSig\__construct(), sspmod_cas_Auth_Source_CAS\casServiceValidate(), sspmod_saml_IdP_SAML2\encodeAttributes(), SimpleSAML\Bindings\Shib13\Artifact\extractResponse(), SimpleSAML\Utils\XML\formatXMLString(), SimpleSAML\Utils\XML\isDOMNodeOfType(), sspmod_metarefresh_MetaLoader\loadXML(), SimpleSAML_Metadata_SAMLParser\parseDescriptorsFile(), SimpleSAML_Metadata_SAMLParser\parseDescriptorsString(), SimpleSAML_Metadata_SAMLParser\parseFile(), SimpleSAML_Metadata_SAMLParser\parseString(), SimpleSAML\Bindings\Shib13\HTTPPost\sendResponse(), SimpleSAML\XML\Shib13\AuthnResponse\setXML(), SimpleSAML_Metadata_Signer\sign(), sspmod_adfs_IdP_ADFS\signResponse(), SAML2\XML\Chunk\unserialize(), and SAML2\XML\saml\AttributeValue\unserialize().
22 if (!is_string(
$xml) || trim(
$xml) ===
'') {
26 $entityLoader = libxml_disable_entity_loader(
true);
27 $internalErrors = libxml_use_internal_errors(
true);
28 libxml_clear_errors();
30 $domDocument = self::create();
31 $options = LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_NONET;
38 libxml_use_internal_errors($internalErrors);
39 libxml_disable_entity_loader($entityLoader);
42 $error = libxml_get_last_error();
43 libxml_clear_errors();
45 throw new UnparseableXmlException(
$error);
48 libxml_clear_errors();
50 foreach ($domDocument->childNodes as $child) {
51 if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
53 'Dangerous XML detected, DOCTYPE nodes are not allowed in the XML body' static invalidType($expected, $parameter)
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
The documentation for this class was generated from the following file: