@@ -6511,68 +6511,44 @@ static void reflection_init_class_handlers(zend_class_entry *ce) {
6511
6511
6512
6512
PHP_MINIT_FUNCTION (reflection ) /* {{{ */
6513
6513
{
6514
- zend_class_entry _reflection_entry ;
6515
-
6516
6514
memcpy (& reflection_object_handlers , & std_object_handlers , sizeof (zend_object_handlers ));
6517
6515
reflection_object_handlers .offset = XtOffsetOf (reflection_object , zo );
6518
6516
reflection_object_handlers .free_obj = reflection_free_objects_storage ;
6519
6517
reflection_object_handlers .clone_obj = NULL ;
6520
6518
reflection_object_handlers .write_property = _reflection_write_property ;
6521
6519
reflection_object_handlers .get_gc = reflection_get_gc ;
6522
6520
6523
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionException" , class_ReflectionException_methods );
6524
- reflection_exception_ptr = zend_register_internal_class_ex (& _reflection_entry , zend_ce_exception );
6521
+ reflection_exception_ptr = register_class_ReflectionException (zend_ce_exception );
6525
6522
6526
- INIT_CLASS_ENTRY (_reflection_entry , "Reflection" , class_Reflection_methods );
6527
- reflection_ptr = zend_register_internal_class (& _reflection_entry );
6523
+ reflection_ptr = register_class_Reflection ();
6528
6524
6529
- INIT_CLASS_ENTRY (_reflection_entry , "Reflector" , class_Reflector_methods );
6530
- reflector_ptr = zend_register_internal_interface (& _reflection_entry );
6531
- zend_class_implements (reflector_ptr , 1 , zend_ce_stringable );
6525
+ reflector_ptr = register_class_Reflector (zend_ce_stringable );
6532
6526
6533
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionFunctionAbstract" , class_ReflectionFunctionAbstract_methods );
6534
- reflection_init_class_handlers (& _reflection_entry );
6535
- reflection_function_abstract_ptr = zend_register_internal_class (& _reflection_entry );
6536
- zend_class_implements (reflection_function_abstract_ptr , 1 , reflector_ptr );
6537
- zend_declare_property_string (reflection_function_abstract_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_ABSTRACT );
6527
+ reflection_function_abstract_ptr = register_class_ReflectionFunctionAbstract (reflector_ptr );
6528
+ reflection_init_class_handlers (reflection_function_abstract_ptr );
6538
6529
6539
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionFunction" , class_ReflectionFunction_methods );
6540
- reflection_init_class_handlers (& _reflection_entry );
6541
- reflection_function_ptr = zend_register_internal_class_ex (& _reflection_entry , reflection_function_abstract_ptr );
6542
- zend_declare_property_string (reflection_function_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_PUBLIC );
6530
+ reflection_function_ptr = register_class_ReflectionFunction (reflection_function_abstract_ptr );
6531
+ reflection_init_class_handlers (reflection_function_ptr );
6543
6532
6544
6533
REGISTER_REFLECTION_CLASS_CONST_LONG (function , "IS_DEPRECATED" , ZEND_ACC_DEPRECATED );
6545
6534
6546
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionGenerator" , class_ReflectionGenerator_methods );
6547
- reflection_init_class_handlers (& _reflection_entry );
6548
- reflection_generator_ptr = zend_register_internal_class (& _reflection_entry );
6549
- reflection_generator_ptr -> ce_flags |= ZEND_ACC_FINAL ;
6550
-
6551
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionParameter" , class_ReflectionParameter_methods );
6552
- reflection_init_class_handlers (& _reflection_entry );
6553
- reflection_parameter_ptr = zend_register_internal_class (& _reflection_entry );
6554
- zend_class_implements (reflection_parameter_ptr , 1 , reflector_ptr );
6555
- zend_declare_property_string (reflection_parameter_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_PUBLIC );
6556
-
6557
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionType" , class_ReflectionType_methods );
6558
- reflection_init_class_handlers (& _reflection_entry );
6559
- reflection_type_ptr = zend_register_internal_class (& _reflection_entry );
6560
- reflection_type_ptr -> ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS ;
6561
- zend_class_implements (reflection_type_ptr , 1 , zend_ce_stringable );
6562
-
6563
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionNamedType" , class_ReflectionNamedType_methods );
6564
- reflection_init_class_handlers (& _reflection_entry );
6565
- reflection_named_type_ptr = zend_register_internal_class_ex (& _reflection_entry , reflection_type_ptr );
6566
-
6567
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionUnionType" , class_ReflectionUnionType_methods );
6568
- reflection_init_class_handlers (& _reflection_entry );
6569
- reflection_union_type_ptr = zend_register_internal_class_ex (& _reflection_entry , reflection_type_ptr );
6570
-
6571
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionMethod" , class_ReflectionMethod_methods );
6572
- reflection_init_class_handlers (& _reflection_entry );
6573
- reflection_method_ptr = zend_register_internal_class_ex (& _reflection_entry , reflection_function_abstract_ptr );
6574
- zend_declare_property_string (reflection_method_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_PUBLIC );
6575
- zend_declare_property_string (reflection_method_ptr , "class" , sizeof ("class" )- 1 , "" , ZEND_ACC_PUBLIC );
6535
+ reflection_generator_ptr = register_class_ReflectionGenerator ();
6536
+ reflection_init_class_handlers (reflection_generator_ptr );
6537
+
6538
+ reflection_parameter_ptr = register_class_ReflectionParameter (reflector_ptr );
6539
+ reflection_init_class_handlers (reflection_parameter_ptr );
6540
+
6541
+ reflection_type_ptr = register_class_ReflectionType (zend_ce_stringable );
6542
+ reflection_init_class_handlers (reflection_type_ptr );
6543
+
6544
+ reflection_named_type_ptr = register_class_ReflectionNamedType (reflection_type_ptr );
6545
+ reflection_init_class_handlers (reflection_named_type_ptr );
6546
+
6547
+ reflection_union_type_ptr = register_class_ReflectionUnionType (reflection_type_ptr );
6548
+ reflection_init_class_handlers (reflection_union_type_ptr );
6549
+
6550
+ reflection_method_ptr = register_class_ReflectionMethod (reflection_function_abstract_ptr );
6551
+ reflection_init_class_handlers (reflection_method_ptr );
6576
6552
6577
6553
REGISTER_REFLECTION_CLASS_CONST_LONG (method , "IS_STATIC" , ZEND_ACC_STATIC );
6578
6554
REGISTER_REFLECTION_CLASS_CONST_LONG (method , "IS_PUBLIC" , ZEND_ACC_PUBLIC );
@@ -6581,65 +6557,43 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */
6581
6557
REGISTER_REFLECTION_CLASS_CONST_LONG (method , "IS_ABSTRACT" , ZEND_ACC_ABSTRACT );
6582
6558
REGISTER_REFLECTION_CLASS_CONST_LONG (method , "IS_FINAL" , ZEND_ACC_FINAL );
6583
6559
6584
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionClass" , class_ReflectionClass_methods );
6585
- reflection_init_class_handlers (& _reflection_entry );
6586
- reflection_class_ptr = zend_register_internal_class (& _reflection_entry );
6587
- zend_class_implements (reflection_class_ptr , 1 , reflector_ptr );
6588
- zend_declare_property_string (reflection_class_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_PUBLIC );
6560
+ reflection_class_ptr = register_class_ReflectionClass (reflector_ptr );
6561
+ reflection_init_class_handlers (reflection_class_ptr );
6589
6562
6590
6563
/* IS_IMPLICIT_ABSTRACT is not longer used */
6591
6564
REGISTER_REFLECTION_CLASS_CONST_LONG (class , "IS_IMPLICIT_ABSTRACT" , ZEND_ACC_IMPLICIT_ABSTRACT_CLASS );
6592
6565
REGISTER_REFLECTION_CLASS_CONST_LONG (class , "IS_EXPLICIT_ABSTRACT" , ZEND_ACC_EXPLICIT_ABSTRACT_CLASS );
6593
6566
REGISTER_REFLECTION_CLASS_CONST_LONG (class , "IS_FINAL" , ZEND_ACC_FINAL );
6594
6567
6595
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionObject" , class_ReflectionObject_methods );
6596
- reflection_init_class_handlers (& _reflection_entry );
6597
- reflection_object_ptr = zend_register_internal_class_ex (& _reflection_entry , reflection_class_ptr );
6568
+ reflection_object_ptr = register_class_ReflectionObject (reflection_class_ptr );
6569
+ reflection_init_class_handlers (reflection_object_ptr );
6598
6570
6599
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionProperty" , class_ReflectionProperty_methods );
6600
- reflection_init_class_handlers (& _reflection_entry );
6601
- reflection_property_ptr = zend_register_internal_class (& _reflection_entry );
6602
- zend_class_implements (reflection_property_ptr , 1 , reflector_ptr );
6603
- zend_declare_property_string (reflection_property_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_PUBLIC );
6604
- zend_declare_property_string (reflection_property_ptr , "class" , sizeof ("class" )- 1 , "" , ZEND_ACC_PUBLIC );
6571
+ reflection_property_ptr = register_class_ReflectionProperty (reflector_ptr );
6572
+ reflection_init_class_handlers (reflection_property_ptr );
6605
6573
6606
6574
REGISTER_REFLECTION_CLASS_CONST_LONG (property , "IS_STATIC" , ZEND_ACC_STATIC );
6607
6575
REGISTER_REFLECTION_CLASS_CONST_LONG (property , "IS_PUBLIC" , ZEND_ACC_PUBLIC );
6608
6576
REGISTER_REFLECTION_CLASS_CONST_LONG (property , "IS_PROTECTED" , ZEND_ACC_PROTECTED );
6609
6577
REGISTER_REFLECTION_CLASS_CONST_LONG (property , "IS_PRIVATE" , ZEND_ACC_PRIVATE );
6610
6578
6611
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionClassConstant" , class_ReflectionClassConstant_methods );
6612
- reflection_init_class_handlers (& _reflection_entry );
6613
- reflection_class_constant_ptr = zend_register_internal_class (& _reflection_entry );
6614
- zend_class_implements (reflection_class_constant_ptr , 1 , reflector_ptr );
6615
- zend_declare_property_string (reflection_class_constant_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_PUBLIC );
6616
- zend_declare_property_string (reflection_class_constant_ptr , "class" , sizeof ("class" )- 1 , "" , ZEND_ACC_PUBLIC );
6579
+ reflection_class_constant_ptr = register_class_ReflectionClassConstant (reflector_ptr );
6580
+ reflection_init_class_handlers (reflection_class_constant_ptr );
6617
6581
6618
6582
REGISTER_REFLECTION_CLASS_CONST_LONG (class_constant , "IS_PUBLIC" , ZEND_ACC_PUBLIC );
6619
6583
REGISTER_REFLECTION_CLASS_CONST_LONG (class_constant , "IS_PROTECTED" , ZEND_ACC_PROTECTED );
6620
6584
REGISTER_REFLECTION_CLASS_CONST_LONG (class_constant , "IS_PRIVATE" , ZEND_ACC_PRIVATE );
6621
6585
6622
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionExtension" , class_ReflectionExtension_methods );
6623
- reflection_init_class_handlers (& _reflection_entry );
6624
- reflection_extension_ptr = zend_register_internal_class (& _reflection_entry );
6625
- zend_class_implements (reflection_extension_ptr , 1 , reflector_ptr );
6626
- zend_declare_property_string (reflection_extension_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_PUBLIC );
6627
-
6628
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionZendExtension" , class_ReflectionZendExtension_methods );
6629
- reflection_init_class_handlers (& _reflection_entry );
6630
- reflection_zend_extension_ptr = zend_register_internal_class (& _reflection_entry );
6631
- zend_class_implements (reflection_zend_extension_ptr , 1 , reflector_ptr );
6632
- zend_declare_property_string (reflection_zend_extension_ptr , "name" , sizeof ("name" )- 1 , "" , ZEND_ACC_PUBLIC );
6633
-
6634
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionReference" , class_ReflectionReference_methods );
6635
- reflection_init_class_handlers (& _reflection_entry );
6636
- _reflection_entry .ce_flags |= ZEND_ACC_FINAL ;
6637
- reflection_reference_ptr = zend_register_internal_class (& _reflection_entry );
6638
-
6639
- INIT_CLASS_ENTRY (_reflection_entry , "ReflectionAttribute" , class_ReflectionAttribute_methods );
6640
- reflection_init_class_handlers (& _reflection_entry );
6641
- _reflection_entry .ce_flags |= ZEND_ACC_FINAL ;
6642
- reflection_attribute_ptr = zend_register_internal_class (& _reflection_entry );
6586
+ reflection_extension_ptr = register_class_ReflectionExtension (reflector_ptr );
6587
+ reflection_init_class_handlers (reflection_extension_ptr );
6588
+
6589
+ reflection_zend_extension_ptr = register_class_ReflectionZendExtension (reflector_ptr );
6590
+ reflection_init_class_handlers (reflection_zend_extension_ptr );
6591
+
6592
+ reflection_reference_ptr = register_class_ReflectionReference ();
6593
+ reflection_init_class_handlers (reflection_reference_ptr );
6594
+
6595
+ reflection_attribute_ptr = register_class_ReflectionAttribute ();
6596
+ reflection_init_class_handlers (reflection_attribute_ptr );
6643
6597
6644
6598
REGISTER_REFLECTION_CLASS_CONST_LONG (attribute , "IS_INSTANCEOF" , REFLECTION_ATTRIBUTE_IS_INSTANCEOF );
6645
6599
0 commit comments