@@ -39,83 +39,91 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
39
39
#define this_ce php_v8_access_control_class_entry
40
40
INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " AccessControl" , php_v8_enum_methods);
41
41
this_ce = zend_register_internal_class (&ce);
42
+ this_ce->ce_flags |= ZEND_ACC_FINAL;
42
43
43
44
zend_declare_class_constant_long (this_ce, ZEND_STRL (" DEFAULT_ACCESS" ), v8::AccessControl::DEFAULT);
44
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_CAN_READ" ), v8::AccessControl::ALL_CAN_READ);
45
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_CAN_WRITE" ), v8::AccessControl::ALL_CAN_WRITE);
45
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_CAN_READ" ), v8::AccessControl::ALL_CAN_READ);
46
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_CAN_WRITE" ), v8::AccessControl::ALL_CAN_WRITE);
46
47
#undef this_ce
47
48
48
49
// v8::ConstructorBehavior
49
50
#define this_ce php_v8_constructor_behavior_class_entry
50
51
INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " ConstructorBehavior" , php_v8_enum_methods);
51
52
this_ce = zend_register_internal_class (&ce);
53
+ this_ce->ce_flags |= ZEND_ACC_FINAL;
52
54
53
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kThrow " ), static_cast <long >(v8::ConstructorBehavior::kThrow ));
54
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kAllow " ), static_cast <long >(v8::ConstructorBehavior::kAllow ));
55
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" THROW " ), static_cast <long >(v8::ConstructorBehavior::kThrow ));
56
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALLOW " ), static_cast <long >(v8::ConstructorBehavior::kAllow ));
55
57
56
58
#undef this_ce
57
59
58
60
// v8::IntegrityLevel
59
61
#define this_ce php_v8_integrity_level_class_entry
60
62
INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " IntegrityLevel" , php_v8_enum_methods);
61
63
this_ce = zend_register_internal_class (&ce);
64
+ this_ce->ce_flags |= ZEND_ACC_FINAL;
62
65
63
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kFrozen " ), static_cast <zend_long>(v8::IntegrityLevel::kFrozen ));
64
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kSealed " ), static_cast <zend_long>(v8::IntegrityLevel::kSealed ));
66
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" FROZEN " ), static_cast <zend_long>(v8::IntegrityLevel::kFrozen ));
67
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" SEALED " ), static_cast <zend_long>(v8::IntegrityLevel::kSealed ));
65
68
#undef this_ce
66
69
67
70
// v8::PropertyAttribute
68
71
#define this_ce php_v8_property_attribute_class_entry
69
72
INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " PropertyAttribute" , php_v8_enum_methods);
70
73
this_ce = zend_register_internal_class (&ce);
74
+ this_ce->ce_flags |= ZEND_ACC_FINAL;
71
75
72
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" None " ), v8::PropertyAttribute::None);
73
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" ReadOnly " ), v8::PropertyAttribute::ReadOnly);
74
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" DontEnum " ), v8::PropertyAttribute::DontEnum);
75
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" DontDelete " ), v8::PropertyAttribute::DontDelete);
76
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" NONE " ), v8::PropertyAttribute::None);
77
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" READ_ONLY " ), v8::PropertyAttribute::ReadOnly);
78
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" DONT_ENUM " ), v8::PropertyAttribute::DontEnum);
79
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" DONT_DELETE " ), v8::PropertyAttribute::DontDelete);
76
80
77
81
#undef this_ce
78
82
79
83
// v8::PropertyHandlerFlags
80
84
#define this_ce php_v8_property_handler_flags_class_entry
81
85
INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " PropertyHandlerFlags" , php_v8_enum_methods);
82
86
this_ce = zend_register_internal_class (&ce);
87
+ this_ce->ce_flags |= ZEND_ACC_FINAL;
83
88
84
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kNone " ), static_cast <zend_long>(v8::PropertyHandlerFlags::kNone ));
85
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kAllCanRead " ), static_cast <zend_long>(v8::PropertyHandlerFlags::kAllCanRead ));
86
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kNonMasking " ), static_cast <zend_long>(v8::PropertyHandlerFlags::kNonMasking ));
87
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kOnlyInterceptStrings " ), static_cast <zend_long>(v8::PropertyHandlerFlags::kOnlyInterceptStrings ));
89
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" NONE " ), static_cast <zend_long>(v8::PropertyHandlerFlags::kNone ));
90
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_CAN_READ " ), static_cast <zend_long>(v8::PropertyHandlerFlags::kAllCanRead ));
91
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" NON_MASKING " ), static_cast <zend_long>(v8::PropertyHandlerFlags::kNonMasking ));
92
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" ONLY_INTERCEPT_STRINGS " ), static_cast <zend_long>(v8::PropertyHandlerFlags::kOnlyInterceptStrings ));
88
93
#undef this_ce
89
94
90
95
// v8::PropertyFilter
91
96
#define this_ce php_v8_property_filter_class_entry
92
97
INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " PropertyFilter" , php_v8_enum_methods);
93
98
this_ce = zend_register_internal_class (&ce);
99
+ this_ce->ce_flags |= ZEND_ACC_FINAL;
94
100
95
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_PROPERTIES" ), v8::PropertyFilter::ALL_PROPERTIES);
96
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" ONLY_WRITABLE" ), v8::PropertyFilter::ONLY_WRITABLE);
97
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" ONLY_ENUMERABLE" ), v8::PropertyFilter::ONLY_ENUMERABLE);
101
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_PROPERTIES" ), v8::PropertyFilter::ALL_PROPERTIES);
102
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" ONLY_WRITABLE" ), v8::PropertyFilter::ONLY_WRITABLE);
103
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" ONLY_ENUMERABLE" ), v8::PropertyFilter::ONLY_ENUMERABLE);
98
104
zend_declare_class_constant_long (this_ce, ZEND_STRL (" ONLY_CONFIGURABLE" ), v8::PropertyFilter::ONLY_CONFIGURABLE);
99
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" SKIP_STRINGS" ), v8::PropertyFilter::SKIP_STRINGS);
100
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" SKIP_SYMBOLS" ), v8::PropertyFilter::SKIP_SYMBOLS);
105
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" SKIP_STRINGS" ), v8::PropertyFilter::SKIP_STRINGS);
106
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" SKIP_SYMBOLS" ), v8::PropertyFilter::SKIP_SYMBOLS);
101
107
#undef this_ce
102
108
103
109
// v8::KeyCollectionMode
104
110
#define this_ce php_v8_key_collection_mode_class_entry
105
111
INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " KeyCollectionMode" , php_v8_enum_methods);
106
112
this_ce = zend_register_internal_class (&ce);
113
+ this_ce->ce_flags |= ZEND_ACC_FINAL;
107
114
108
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kOwnOnly " ), static_cast <zend_long>(v8::KeyCollectionMode::kOwnOnly ));
109
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kIncludePrototypes " ), static_cast <zend_long>(v8::KeyCollectionMode::kIncludePrototypes ));
115
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" OWN_ONLY " ), static_cast <zend_long>(v8::KeyCollectionMode::kOwnOnly ));
116
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" INCLUDE_PROTOTYPES " ), static_cast <zend_long>(v8::KeyCollectionMode::kIncludePrototypes ));
110
117
#undef this_ce
111
118
112
119
// v8::IndexFilter
113
120
#define this_ce php_v8_index_filter_class_entry
114
121
INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " IndexFilter" , php_v8_enum_methods);
115
122
this_ce = zend_register_internal_class (&ce);
123
+ this_ce->ce_flags |= ZEND_ACC_FINAL;
116
124
117
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kIncludeIndices " ), static_cast <zend_long>(v8::IndexFilter::kIncludeIndices ));
118
- zend_declare_class_constant_long (this_ce, ZEND_STRL (" kSkipIndices " ), static_cast <zend_long>(v8::IndexFilter::kSkipIndices ));
125
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" INCLUDE_INDICES " ), static_cast <zend_long>(v8::IndexFilter::kIncludeIndices ));
126
+ zend_declare_class_constant_long (this_ce, ZEND_STRL (" SKIP_INDICES " ), static_cast <zend_long>(v8::IndexFilter::kSkipIndices ));
119
127
#undef this_ce
120
128
121
129
return SUCCESS;
0 commit comments