-
Notifications
You must be signed in to change notification settings - Fork 0
/
Consts.php
executable file
·66 lines (60 loc) · 2.52 KB
/
Consts.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/*
* PHP DOM: Implementation of the Document Object Model (DOM) Level 3 Core Specification <http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226> in PHP.
* Jonas Raoni Soares da Silva <http://raoni.org>
* https://github.com/jonasraoni/php-dom
*/
//:: NODE TYPES :: //
Define('ELEMENT_NODE', 1, True);
Define('ATTRIBUTE_NODE', 2, True);
Define('TEXT_NODE', 3, True);
Define('CDATA_SECTION_NODE', 4, True);
Define('ENTITY_REFERENCE_NODE', 5, True);
Define('ENTITY_NODE', 6, True);
Define('PROCESSING_INSTRUCTION_NODE', 7, True);
Define('COMMENT_NODE', 8, True);
Define('DOCUMENT_NODE', 9, True);
Define('DOCUMENT_TYPE_NODE', 10, True);
Define('DOCUMENT_FRAGMENT_NODE', 11, True);
Define('NOTATION_NODE', 12, True);
//:: NODE POSITION RETURNS :: //
Define('DOCUMENT_POSITION_DISCONNECTED', 0x01, True);
Define('DOCUMENT_POSITION_PRECEDING', 0x02, True);
Define('DOCUMENT_POSITION_FOLLOWING', 0x04, True);
Define('DOCUMENT_POSITION_CONTAINS', 0x08, True);
Define('DOCUMENT_POSITION_IS_CONTAINED', 0x10, True);
Define('DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC', 0x20, True);
//:: USER DATA HANDLER OPERATION TYPE :: //
Define('NODE_CLONED', 1, True);
Define('NODE_IMPORTED', 2, True);
Define('NODE_DELETED', 3, True);
Define('NODE_RENAMED', 4, True);
Define('NODE_REMOVED', 5, True);
//:: DOM ERROR SEVERITY :://
Define('SEVERITY_WARNING', 1, True);
Define('SEVERITY_ERROR', 2, True);
Define('SEVERITY_FATAL_ERROR', 3, True);
//:: ERROR TYPES :://
Define('INDEX_SIZE_ERR', 1, True);
Define('DOMSTRING_SIZE_ERR', 2, True);
Define('HIERARCHY_REQUEST_ERR', 3, True);
Define('WRONG_DOCUMENT_ERR', 4, True);
Define('INVALID_CHARACTER_ERR', 5, True);
Define('NO_DATA_ALLOWED_ERR', 6, True);
Define('NO_MODIFICATION_ALLOWED_ERR', 7, True);
Define('NOT_FOUND_ERR', 8, True);
Define('NOT_SUPPORTED_ERR', 9, True);
Define('INUSE_ATTRIBUTE_ERR', 10, True);
Define('INVALID_STATE_ERR', 11, True);
Define('SYNTAX_ERR', 12, True);
Define('INVALID_MODIFICATION_ERR', 13, True);
Define('NAMESPACE_ERR', 14, True);
Define('INVALID_ACCESS_ERR', 15, True);
Define('VALIDATION_ERR', 16, True);
$POSITION_STRINGS = array(DOCUMENT_POSITION_DISCONNECTED=>'DOCUMENT_POSITION_DISCONNECTED',
DOCUMENT_POSITION_PRECEDING=>'DOCUMENT_POSITION_PRECEDING',
DOCUMENT_POSITION_FOLLOWING=>'DOCUMENT_POSITION_FOLLOWING',
DOCUMENT_POSITION_CONTAINS=>'DOCUMENT_POSITION_CONTAINS',
DOCUMENT_POSITION_IS_CONTAINED=>'DOCUMENT_POSITION_IS_CONTAINED',
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=>'DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC'
)