This repository was archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathphp_v8_enums.h
88 lines (72 loc) · 2.93 KB
/
php_v8_enums.h
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* This file is part of the pinepain/php-v8 PHP extension.
*
* Copyright (c) 2015-2017 Bogdan Padalko <[email protected]>
*
* Licensed under the MIT license: http://opensource.org/licenses/MIT
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this source or visit
* http://opensource.org/licenses/MIT
*/
#ifndef PHP_V8_ENUMS_H
#define PHP_V8_ENUMS_H
#include <v8.h>
extern "C" {
#include "php.h"
#ifdef ZTS
#include "TSRM.h"
#endif
}
extern zend_class_entry* php_v8_access_control_class_entry;
extern zend_class_entry* php_v8_constructor_behavior_class_entry;
extern zend_class_entry* php_v8_integrity_level_class_entry;
extern zend_class_entry* php_v8_property_attribute_class_entry;
extern zend_class_entry* php_v8_property_handler_flags_class_entry;
extern zend_class_entry* php_v8_property_filter_class_entry;
extern zend_class_entry* php_v8_key_collection_mode_class_entry;
extern zend_class_entry* php_v8_index_filter_class_entry;
extern zend_class_entry *php_v8_rail_mode_class_entry;
#define PHP_V8_ACCESS_CONTROL_FLAGS ( 0 \
| v8::AccessControl::DEFAULT \
| v8::AccessControl::ALL_CAN_READ \
| v8::AccessControl::ALL_CAN_WRITE \
)
#define PHP_V8_CONSTRUCTOR_BEHAVIOR_FLAGS ( 0 \
| static_cast<long>(v8::ConstructorBehavior::kAllow) \
| static_cast<long>(v8::ConstructorBehavior::kThrow) \
)
#define PHP_V8_INTEGRITY_LEVEL_FLAGS ( 0 \
| static_cast<long>(v8::IntegrityLevel::kFrozen) \
| static_cast<long>(v8::IntegrityLevel::kSealed) \
)
#define PHP_V8_PROPERTY_ATTRIBUTE_FLAGS ( 0 \
| v8::PropertyAttribute::None \
| v8::PropertyAttribute::ReadOnly \
| v8::PropertyAttribute::DontEnum \
| v8::PropertyAttribute::DontDelete \
)
#define PHP_V8_PROPERTY_HANDLER_FLAGS ( 0 \
| static_cast<long>(v8::PropertyHandlerFlags::kNone) \
| static_cast<long>(v8::PropertyHandlerFlags::kAllCanRead) \
| static_cast<long>(v8::PropertyHandlerFlags::kNonMasking) \
| static_cast<long>(v8::PropertyHandlerFlags::kOnlyInterceptStrings) \
)
#define PHP_V8_PROPERTY_FILTER_FLAGS ( 0 \
| v8::PropertyFilter::ALL_PROPERTIES \
| v8::PropertyFilter::ONLY_WRITABLE \
| v8::PropertyFilter::ONLY_ENUMERABLE \
| v8::PropertyFilter::ONLY_CONFIGURABLE \
| v8::PropertyFilter::SKIP_STRINGS \
| v8::PropertyFilter::SKIP_SYMBOLS \
)
#define PHP_V8_KEY_COLLECTION_MODE_FLAGS ( 0 \
| static_cast<long>(v8::KeyCollectionMode::kOwnOnly) \
| static_cast<long>(v8::KeyCollectionMode::kIncludePrototypes) \
)
#define PHP_V8_INDEX_FILTER_FLAGS ( 0 \
| static_cast<long>(v8::IndexFilter::kIncludeIndices) \
| static_cast<long>(v8::IndexFilter::kSkipIndices) \
)
PHP_MINIT_FUNCTION (php_v8_enums);
#endif //PHP_V8_ENUMS_H