simplesamlphp /
xml-common
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace SimpleSAML\XPath; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Various XML constants. |
||
| 9 | * |
||
| 10 | * @package simplesamlphp/xml-common |
||
| 11 | */ |
||
| 12 | class Constants extends \SimpleSAML\XML\Constants |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The namespace for the XML Path Language 1.0 |
||
| 16 | */ |
||
| 17 | public const string XPATH10_URI = 'http://www.w3.org/TR/1999/REC-xpath-19991116'; |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 18 | |||
| 19 | /** @var array<string> */ |
||
| 20 | public const array ALL_AXES = [ |
||
| 21 | 'ancestor', |
||
| 22 | 'ancestor-or-self', |
||
| 23 | 'attribute', |
||
| 24 | 'child', |
||
| 25 | 'descendant', |
||
| 26 | 'descendant-or-self', |
||
| 27 | 'following', |
||
| 28 | 'following-sibling', |
||
| 29 | 'namespace', |
||
| 30 | 'parent', |
||
| 31 | 'preceding', |
||
| 32 | 'preceding-sibling', |
||
| 33 | 'self', |
||
| 34 | ]; |
||
| 35 | |||
| 36 | /** @var array<string> */ |
||
| 37 | public const array DEFAULT_ALLOWED_AXES = [ |
||
| 38 | 'ancestor', |
||
| 39 | 'ancestor-or-self', |
||
| 40 | 'attribute', |
||
| 41 | 'child', |
||
| 42 | 'descendant', |
||
| 43 | 'descendant-or-self', |
||
| 44 | 'following', |
||
| 45 | 'following-sibling', |
||
| 46 | // 'namespace', // By default, we do not allow using the namespace axis |
||
| 47 | 'parent', |
||
| 48 | 'preceding', |
||
| 49 | 'preceding-sibling', |
||
| 50 | 'self', |
||
| 51 | ]; |
||
| 52 | |||
| 53 | /** @var array<string> */ |
||
| 54 | public const array ALL_FUNCTIONS = [ |
||
| 55 | 'boolean', |
||
| 56 | 'ceiling', |
||
| 57 | 'concat', |
||
| 58 | 'contains', |
||
| 59 | 'count', |
||
| 60 | 'false', |
||
| 61 | 'floor', |
||
| 62 | 'id', |
||
| 63 | 'lang', |
||
| 64 | 'last', |
||
| 65 | 'local-name', |
||
| 66 | 'name', |
||
| 67 | 'namespace-uri', |
||
| 68 | 'normalize-space', |
||
| 69 | 'not', |
||
| 70 | 'number', |
||
| 71 | 'position', |
||
| 72 | 'round', |
||
| 73 | 'starts-with', |
||
| 74 | 'string', |
||
| 75 | 'string-length', |
||
| 76 | 'substring', |
||
| 77 | 'substring-after', |
||
| 78 | 'substring-before', |
||
| 79 | 'sum', |
||
| 80 | 'text', |
||
| 81 | 'translate', |
||
| 82 | 'true', |
||
| 83 | ]; |
||
| 84 | |||
| 85 | /** @var array<string> */ |
||
| 86 | public const array DEFAULT_ALLOWED_FUNCTIONS = [ |
||
| 87 | // 'boolean', |
||
| 88 | // 'ceiling', |
||
| 89 | // 'concat', |
||
| 90 | // 'contains', |
||
| 91 | // 'count', |
||
| 92 | // 'false', |
||
| 93 | // 'floor', |
||
| 94 | // 'id', |
||
| 95 | // 'lang', |
||
| 96 | // 'last', |
||
| 97 | // 'local-name', |
||
| 98 | // 'name', |
||
| 99 | // 'namespace-uri', |
||
| 100 | // 'normalize-space', |
||
| 101 | 'not', |
||
| 102 | // 'number', |
||
| 103 | // 'position', |
||
| 104 | // 'round', |
||
| 105 | // 'starts-with', |
||
| 106 | // 'string', |
||
| 107 | // 'string-length', |
||
| 108 | // 'substring', |
||
| 109 | // 'substring-after', |
||
| 110 | // 'substring-before', |
||
| 111 | // 'sum', |
||
| 112 | // 'text', |
||
| 113 | // 'translate', |
||
| 114 | // 'true', |
||
| 115 | ]; |
||
| 116 | |||
| 117 | public const int XPATH_FILTER_MAX_LENGTH = 100; |
||
| 118 | } |
||
| 119 |