File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,15 @@ class XPath extends \SimpleSAML\XPath\XPath
1919 * Get a DOMXPath object that can be used to search for SAML elements.
2020 *
2121 * @param \DOMNode $node The document to associate to the DOMXPath object.
22+ * @param bool $autoregister Whether to auto-register all namespaces used in the document
2223 *
2324 * @return \DOMXPath A DOMXPath object ready to use in the given document, with several
2425 * saml-related namespaces already registered.
2526 */
26- public static function getXPath (DOMNode $ node ): DOMXPath
27+ public static function getXPath (DOMNode $ node, bool $ autoregister = false ): DOMXPath
2728 {
28- $ xp = parent ::getXPath ($ node );
29+ $ xp = parent ::getXPath ($ node , $ autoregister );
30+
2931 $ xp ->registerNamespace ('env11 ' , C::NS_SOAP_ENV );
3032 $ xp ->registerNamespace ('enc11 ' , C::NS_SOAP_ENC );
3133
Original file line number Diff line number Diff line change @@ -19,13 +19,15 @@ class XPath extends \SimpleSAML\XPath\XPath
1919 * Get a DOMXPath object that can be used to search for SAML elements.
2020 *
2121 * @param \DOMNode $node The document to associate to the DOMXPath object.
22+ * @param bool $autoregister Whether to auto-register all namespaces used in the document
2223 *
2324 * @return \DOMXPath A DOMXPath object ready to use in the given document, with several
2425 * saml-related namespaces already registered.
2526 */
26- public static function getXPath (DOMNode $ node ): DOMXPath
27+ public static function getXPath (DOMNode $ node, bool $ autoregister = false ): DOMXPath
2728 {
28- $ xp = parent ::getXPath ($ node );
29+ $ xp = parent ::getXPath ($ node , $ autoregister );
30+
2931 $ xp ->registerNamespace ('env12 ' , C::NS_SOAP_ENV );
3032 $ xp ->registerNamespace ('enc12 ' , C::NS_SOAP_ENC );
3133
You can’t perform that action at this time.
0 commit comments