|
static | filterAttrValue ($value, $quotes=self::ALL_QUOTES) |
| Filter an attribute value for save inclusion in an XPath query. More...
|
|
static | filterAttrName ($name, $allow=self::EXTENDED_ALPHANUMERIC) |
| Filter an attribute name for save inclusion in an XPath query. More...
|
|
Definition at line 5 of file XPath.php.
◆ filterAttrName()
static RobRichards\XMLSecLibs\Utils\XPath::filterAttrName |
( |
|
$name, |
|
|
|
$allow = self::EXTENDED_ALPHANUMERIC |
|
) |
| |
|
static |
Filter an attribute name for save inclusion in an XPath query.
- Parameters
-
string | $name | The attribute name to filter. |
mixed | $allow | The set of characters to allow. Can be one of the constants provided by this class, or a custom regex excluding the '#' character (used as delimiter). |
- Returns
- string The filtered attribute name.
Definition at line 40 of file XPath.php.
References $name.
42 return preg_replace(
'#[^'.$allow.
']#',
'',
$name);
◆ filterAttrValue()
static RobRichards\XMLSecLibs\Utils\XPath::filterAttrValue |
( |
|
$value, |
|
|
|
$quotes = self::ALL_QUOTES |
|
) |
| |
|
static |
Filter an attribute value for save inclusion in an XPath query.
- Parameters
-
string | $value | The value to filter. |
string | $quotes | The quotes used to delimit the value in the XPath query. |
- Returns
- string The filtered attribute value.
Definition at line 25 of file XPath.php.
27 return preg_replace(
'#'.$quotes.
'#',
'', $value);
◆ ALL_QUOTES
const RobRichards\XMLSecLibs\Utils\XPath::ALL_QUOTES = '[\'"]' |
◆ ALPHANUMERIC
const RobRichards\XMLSecLibs\Utils\XPath::ALPHANUMERIC = '\w\d' |
◆ DOUBLE_QUOTE
const RobRichards\XMLSecLibs\Utils\XPath::DOUBLE_QUOTE = '"' |
◆ EXTENDED_ALPHANUMERIC
const RobRichards\XMLSecLibs\Utils\XPath::EXTENDED_ALPHANUMERIC = '\w\d\s\-_:\.' |
◆ LETTERS
const RobRichards\XMLSecLibs\Utils\XPath::LETTERS = '\w' |
◆ NUMERIC
const RobRichards\XMLSecLibs\Utils\XPath::NUMERIC = '\d' |
◆ SINGLE_QUOTE
const RobRichards\XMLSecLibs\Utils\XPath::SINGLE_QUOTE = '\'' |
The documentation for this class was generated from the following file:
- libs/composer/vendor/robrichards/xmlseclibs/src/Utils/XPath.php