@@ -84,6 +84,7 @@ PHPAPI zend_class_entry *reflection_class_constant_ptr;
84
84
PHPAPI zend_class_entry *reflection_extension_ptr;
85
85
PHPAPI zend_class_entry *reflection_zend_extension_ptr;
86
86
PHPAPI zend_class_entry *reflection_reference_ptr;
87
+ PHPAPI zend_class_entry *reflection_attribute_ptr;
87
88
88
89
/* Exception throwing macro */
89
90
#define _DO_THROW(msg) \
@@ -6275,6 +6276,27 @@ ZEND_METHOD(reflection_reference, getId)
6275
6276
}
6276
6277
/* }}} */
6277
6278
6279
+ /* {{{ proto public string ReflectionAttribute::getName()
6280
+ * Returns the name of the attribute */
6281
+ ZEND_METHOD(reflection_attribute, getName)
6282
+ {
6283
+ }
6284
+ /* }}} */
6285
+
6286
+ /* {{{ proto public string ReflectionAttribute::getArguments()
6287
+ * Returns the arguments passed to the attribute */
6288
+ ZEND_METHOD(reflection_attribute, getArguments)
6289
+ {
6290
+ }
6291
+ /* }}} */
6292
+
6293
+ /* {{{ proto public string ReflectionAttribute::getAsObject()
6294
+ * Returns the attribute as an object */
6295
+ ZEND_METHOD(reflection_attribute, getAsObject)
6296
+ {
6297
+ }
6298
+ /* }}} */
6299
+
6278
6300
/* {{{ method tables */
6279
6301
static const zend_function_entry reflection_exception_functions[] = {
6280
6302
PHP_FE_END
@@ -6302,7 +6324,7 @@ static const zend_function_entry reflection_function_abstract_functions[] = {
6302
6324
ZEND_ME(reflection_function, getClosureThis, arginfo_class_ReflectionFunctionAbstract_getClosureThis, 0)
6303
6325
ZEND_ME(reflection_function, getClosureScopeClass, arginfo_class_ReflectionFunctionAbstract_getClosureScopeClass, 0)
6304
6326
ZEND_ME(reflection_function, getDocComment, arginfo_class_ReflectionFunctionAbstract_getDocComment, 0)
6305
- ZEND_ME(reflection_function, getAttributes, arginfo_class_ReflectionFunctionAbstract_getDocComment , 0)
6327
+ ZEND_ME(reflection_function, getAttributes, arginfo_class_ReflectionFunctionAbstract_getAttributes , 0)
6306
6328
ZEND_ME(reflection_function, getEndLine, arginfo_class_ReflectionFunctionAbstract_getEndLine, 0)
6307
6329
ZEND_ME(reflection_function, getExtension, arginfo_class_ReflectionFunctionAbstract_getExtension, 0)
6308
6330
ZEND_ME(reflection_function, getExtensionName, arginfo_class_ReflectionFunctionAbstract_getExtensionName, 0)
@@ -6377,7 +6399,7 @@ static const zend_function_entry reflection_class_functions[] = {
6377
6399
ZEND_ME(reflection_class, getStartLine, arginfo_class_ReflectionClass_getStartLine, 0)
6378
6400
ZEND_ME(reflection_class, getEndLine, arginfo_class_ReflectionClass_getEndLine, 0)
6379
6401
ZEND_ME(reflection_class, getDocComment, arginfo_class_ReflectionClass_getDocComment, 0)
6380
- ZEND_ME(reflection_class, getAttributes, arginfo_class_ReflectionClass_getDocComment , 0)
6402
+ ZEND_ME(reflection_class, getAttributes, arginfo_class_ReflectionClass_getAttributes , 0)
6381
6403
ZEND_ME(reflection_class, getConstructor, arginfo_class_ReflectionClass_getConstructor, 0)
6382
6404
ZEND_ME(reflection_class, hasMethod, arginfo_class_ReflectionClass_hasMethod, 0)
6383
6405
ZEND_ME(reflection_class, getMethod, arginfo_class_ReflectionClass_getMethod, 0)
@@ -6442,7 +6464,7 @@ static const zend_function_entry reflection_property_functions[] = {
6442
6464
ZEND_ME(reflection_property, getModifiers, arginfo_class_ReflectionProperty_getModifiers, 0)
6443
6465
ZEND_ME(reflection_property, getDeclaringClass, arginfo_class_ReflectionProperty_getDeclaringClass, 0)
6444
6466
ZEND_ME(reflection_property, getDocComment, arginfo_class_ReflectionProperty_getDocComment, 0)
6445
- ZEND_ME(reflection_property, getAttributes, arginfo_class_ReflectionProperty_getDocComment , 0)
6467
+ ZEND_ME(reflection_property, getAttributes, arginfo_class_ReflectionProperty_getAttributes , 0)
6446
6468
ZEND_ME(reflection_property, setAccessible, arginfo_class_ReflectionProperty_setAccessible, 0)
6447
6469
ZEND_ME(reflection_property, getType, arginfo_class_ReflectionProperty_getType, 0)
6448
6470
ZEND_ME(reflection_property, hasType, arginfo_class_ReflectionProperty_hasType, 0)
@@ -6463,7 +6485,7 @@ static const zend_function_entry reflection_class_constant_functions[] = {
6463
6485
ZEND_ME(reflection_class_constant, getModifiers, arginfo_class_ReflectionClassConstant_getModifiers, 0)
6464
6486
ZEND_ME(reflection_class_constant, getDeclaringClass, arginfo_class_ReflectionClassConstant_getDeclaringClass, 0)
6465
6487
ZEND_ME(reflection_class_constant, getDocComment, arginfo_class_ReflectionClassConstant_getDocComment, 0)
6466
- ZEND_ME(reflection_class_constant, getAttributes, arginfo_class_ReflectionClassConstant_getDocComment , 0)
6488
+ ZEND_ME(reflection_class_constant, getAttributes, arginfo_class_ReflectionClassConstant_getAttributes , 0)
6467
6489
PHP_FE_END
6468
6490
};
6469
6491
@@ -6549,6 +6571,17 @@ static const zend_function_entry reflection_reference_functions[] = {
6549
6571
ZEND_ME(reflection_reference, __construct, arginfo_class_ReflectionReference___construct, ZEND_ACC_PRIVATE)
6550
6572
PHP_FE_END
6551
6573
};
6574
+
6575
+ static const zend_function_entry reflection_attribute_functions[] = {
6576
+ ZEND_ME(reflection_attribute, getName, arginfo_class_ReflectionAttribute_getName, ZEND_ACC_PUBLIC)
6577
+ ZEND_ME(reflection_attribute, getArguments, arginfo_class_ReflectionAttribute_getArguments, ZEND_ACC_PUBLIC)
6578
+ ZEND_ME(reflection_attribute, getAsObject, arginfo_class_ReflectionAttribute_getAsObject, ZEND_ACC_PUBLIC)
6579
+
6580
+ /* Always throwing dummy methods */
6581
+ ZEND_ME(reflection, __clone, arginfo_class_ReflectionReference___clone, ZEND_ACC_PRIVATE)
6582
+ ZEND_ME(reflection_reference, __construct, arginfo_class_ReflectionReference___construct, ZEND_ACC_PRIVATE)
6583
+ PHP_FE_END
6584
+ };
6552
6585
/* }}} */
6553
6586
6554
6587
static const zend_function_entry reflection_ext_functions[] = { /* {{{ */
@@ -6699,6 +6732,11 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */
6699
6732
_reflection_entry.ce_flags |= ZEND_ACC_FINAL;
6700
6733
reflection_reference_ptr = zend_register_internal_class(&_reflection_entry);
6701
6734
6735
+ INIT_CLASS_ENTRY(_reflection_entry, "ReflectionAttribute", reflection_attribute_functions);
6736
+ reflection_init_class_handlers(&_reflection_entry);
6737
+ _reflection_entry.ce_flags |= ZEND_ACC_FINAL;
6738
+ reflection_attribute_ptr = zend_register_internal_class(&_reflection_entry);
6739
+
6702
6740
REFLECTION_G(key_initialized) = 0;
6703
6741
6704
6742
return SUCCESS;
0 commit comments