@@ -1261,101 +1261,6 @@ static void reflection_class_constant_factory(zend_class_entry *ce, zend_string
1261
1261
}
1262
1262
/* }}} */
1263
1263
1264
- static void reflection_export_impl (zval * return_value , zval * object , zend_bool return_output ) {
1265
- zval fname , retval ;
1266
- int result ;
1267
-
1268
- /* Invoke the __toString() method */
1269
- ZVAL_STRINGL (& fname , "__tostring" , sizeof ("__tostring" ) - 1 );
1270
- result = call_user_function (NULL , object , & fname , & retval , 0 , NULL );
1271
- zval_ptr_dtor_str (& fname );
1272
-
1273
- if (result == FAILURE ) {
1274
- _DO_THROW ("Invocation of method __toString() failed" );
1275
- RETURN_THROWS ();
1276
- }
1277
-
1278
- if (Z_TYPE (retval ) == IS_UNDEF ) {
1279
- php_error_docref (NULL , E_WARNING , "%s::__toString() did not return anything" , ZSTR_VAL (Z_OBJCE_P (object )-> name ));
1280
- RETURN_FALSE ;
1281
- }
1282
-
1283
- if (return_output ) {
1284
- ZVAL_COPY_VALUE (return_value , & retval );
1285
- } else {
1286
- /* No need for _r variant, return of __toString should always be a string */
1287
- zend_print_zval (& retval , 0 );
1288
- zend_printf ("\n" );
1289
- zval_ptr_dtor (& retval );
1290
- }
1291
- }
1292
-
1293
- /* {{{ _reflection_export */
1294
- static void _reflection_export (INTERNAL_FUNCTION_PARAMETERS , zend_class_entry * ce_ptr , int ctor_argc )
1295
- {
1296
- zval reflector ;
1297
- zval * argument_ptr , * argument2_ptr ;
1298
- zval retval , params [2 ];
1299
- int result ;
1300
- int return_output = 0 ;
1301
- zend_fcall_info fci ;
1302
- zend_fcall_info_cache fcc ;
1303
-
1304
- if (ctor_argc == 1 ) {
1305
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "z|b" , & argument_ptr , & return_output ) == FAILURE ) {
1306
- RETURN_THROWS ();
1307
- }
1308
- ZVAL_COPY_VALUE (& params [0 ], argument_ptr );
1309
- ZVAL_NULL (& params [1 ]);
1310
- } else {
1311
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "zz|b" , & argument_ptr , & argument2_ptr , & return_output ) == FAILURE ) {
1312
- RETURN_THROWS ();
1313
- }
1314
- ZVAL_COPY_VALUE (& params [0 ], argument_ptr );
1315
- ZVAL_COPY_VALUE (& params [1 ], argument2_ptr );
1316
- }
1317
-
1318
- /* Create object */
1319
- if (object_init_ex (& reflector , ce_ptr ) == FAILURE ) {
1320
- _DO_THROW ("Could not create reflector" );
1321
- RETURN_THROWS ();
1322
- }
1323
-
1324
- /* Call __construct() */
1325
-
1326
- fci .size = sizeof (fci );
1327
- ZVAL_UNDEF (& fci .function_name );
1328
- fci .object = Z_OBJ (reflector );
1329
- fci .retval = & retval ;
1330
- fci .param_count = ctor_argc ;
1331
- fci .params = params ;
1332
- fci .no_separation = 1 ;
1333
-
1334
- fcc .function_handler = ce_ptr -> constructor ;
1335
- fcc .called_scope = Z_OBJCE (reflector );
1336
- fcc .object = Z_OBJ (reflector );
1337
-
1338
- result = zend_call_function (& fci , & fcc );
1339
-
1340
- zval_ptr_dtor (& retval );
1341
-
1342
- if (EG (exception )) {
1343
- zval_ptr_dtor (& reflector );
1344
- RETURN_THROWS ();
1345
- }
1346
- if (result == FAILURE ) {
1347
- zval_ptr_dtor (& reflector );
1348
- _DO_THROW ("Could not create reflector" );
1349
- RETURN_THROWS ();
1350
- }
1351
-
1352
- reflection_export_impl (return_value , & reflector , return_output );
1353
-
1354
- /* Destruct reflector which is no longer needed */
1355
- zval_ptr_dtor (& reflector );
1356
- }
1357
- /* }}} */
1358
-
1359
1264
/* {{{ _reflection_param_get_default_param */
1360
1265
static parameter_reference * _reflection_param_get_default_param (INTERNAL_FUNCTION_PARAMETERS )
1361
1266
{
@@ -1408,23 +1313,6 @@ ZEND_METHOD(reflection, __clone)
1408
1313
}
1409
1314
/* }}} */
1410
1315
1411
- /* {{{ proto public static mixed Reflection::export(Reflector r [, bool return])
1412
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
1413
- ZEND_METHOD (reflection , export )
1414
- {
1415
- zval * object ;
1416
- zend_bool return_output = 0 ;
1417
-
1418
- ZEND_PARSE_PARAMETERS_START (1 , 2 )
1419
- Z_PARAM_OBJECT_OF_CLASS (object , reflector_ptr )
1420
- Z_PARAM_OPTIONAL
1421
- Z_PARAM_BOOL (return_output )
1422
- ZEND_PARSE_PARAMETERS_END ();
1423
-
1424
- reflection_export_impl (return_value , object , return_output );
1425
- }
1426
- /* }}} */
1427
-
1428
1316
/* {{{ proto public static array Reflection::getModifierNames(int modifiers)
1429
1317
Returns an array of modifier names */
1430
1318
ZEND_METHOD (reflection , getModifierNames )
@@ -1463,14 +1351,6 @@ ZEND_METHOD(reflection, getModifierNames)
1463
1351
}
1464
1352
/* }}} */
1465
1353
1466
- /* {{{ proto public static mixed ReflectionFunction::export(string name [, bool return])
1467
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
1468
- ZEND_METHOD (reflection_function , export )
1469
- {
1470
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_function_ptr , 1 );
1471
- }
1472
- /* }}} */
1473
-
1474
1354
/* {{{ proto public void ReflectionFunction::__construct(string name)
1475
1355
Constructor. Throws an Exception in case the given function does not exist */
1476
1356
ZEND_METHOD (reflection_function , __construct )
@@ -2227,14 +2107,6 @@ ZEND_METHOD(reflection_generator, getExecutingGenerator)
2227
2107
}
2228
2108
/* }}} */
2229
2109
2230
- /* {{{ proto public static mixed ReflectionParameter::export(mixed function, mixed parameter [, bool return]) throws ReflectionException
2231
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
2232
- ZEND_METHOD (reflection_parameter , export )
2233
- {
2234
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_parameter_ptr , 2 );
2235
- }
2236
- /* }}} */
2237
-
2238
2110
/* {{{ proto public void ReflectionParameter::__construct(mixed function, mixed parameter)
2239
2111
Constructor. Throws an Exception in case the given method does not exist */
2240
2112
ZEND_METHOD (reflection_parameter , __construct )
@@ -2986,14 +2858,6 @@ ZEND_METHOD(reflection_union_type, getTypes)
2986
2858
}
2987
2859
/* }}} */
2988
2860
2989
- /* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name [, bool return]) throws ReflectionException
2990
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
2991
- ZEND_METHOD (reflection_method , export )
2992
- {
2993
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_method_ptr , 2 );
2994
- }
2995
- /* }}} */
2996
-
2997
2861
/* {{{ proto public void ReflectionMethod::__construct(mixed class_or_method [, string name])
2998
2862
Constructor. Throws an Exception in case the given method does not exist */
2999
2863
ZEND_METHOD (reflection_method , __construct )
@@ -3750,14 +3614,6 @@ ZEND_METHOD(reflection_class_constant, getDocComment)
3750
3614
}
3751
3615
/* }}} */
3752
3616
3753
- /* {{{ proto public static mixed ReflectionClass::export(mixed argument [, bool return]) throws ReflectionException
3754
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
3755
- ZEND_METHOD (reflection_class , export )
3756
- {
3757
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_class_ptr , 1 );
3758
- }
3759
- /* }}} */
3760
-
3761
3617
/* {{{ reflection_class_object_ctor */
3762
3618
static void reflection_class_object_ctor (INTERNAL_FUNCTION_PARAMETERS , int is_object )
3763
3619
{
@@ -5254,14 +5110,6 @@ ZEND_METHOD(reflection_class, getShortName)
5254
5110
}
5255
5111
/* }}} */
5256
5112
5257
- /* {{{ proto public static mixed ReflectionObject::export(mixed argument [, bool return]) throws ReflectionException
5258
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
5259
- ZEND_METHOD (reflection_object , export )
5260
- {
5261
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_object_ptr , 1 );
5262
- }
5263
- /* }}} */
5264
-
5265
5113
/* {{{ proto public void ReflectionObject::__construct(mixed argument) throws ReflectionException
5266
5114
Constructor. Takes an instance as an argument */
5267
5115
ZEND_METHOD (reflection_object , __construct )
@@ -5270,22 +5118,6 @@ ZEND_METHOD(reflection_object, __construct)
5270
5118
}
5271
5119
/* }}} */
5272
5120
5273
- /* {{{ proto public static mixed ReflectionProperty::export(mixed class, string name [, bool return]) throws ReflectionException
5274
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
5275
- ZEND_METHOD (reflection_property , export )
5276
- {
5277
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_property_ptr , 2 );
5278
- }
5279
- /* }}} */
5280
-
5281
- /* {{{ proto public static mixed ReflectionClassConstant::export(mixed class, string name [, bool return]) throws ReflectionException
5282
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
5283
- ZEND_METHOD (reflection_class_constant , export )
5284
- {
5285
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_class_constant_ptr , 2 );
5286
- }
5287
- /* }}} */
5288
-
5289
5121
/* {{{ proto public void ReflectionProperty::__construct(mixed class, string name)
5290
5122
Constructor. Throws an Exception in case the given property does not exist */
5291
5123
ZEND_METHOD (reflection_property , __construct )
@@ -5782,14 +5614,6 @@ ZEND_METHOD(reflection_property, getDefaultValue)
5782
5614
}
5783
5615
/* }}} */
5784
5616
5785
- /* {{{ proto public static mixed ReflectionExtension::export(string name [, bool return]) throws ReflectionException
5786
- Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
5787
- ZEND_METHOD (reflection_extension , export )
5788
- {
5789
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_extension_ptr , 1 );
5790
- }
5791
- /* }}} */
5792
-
5793
5617
/* {{{ proto public void ReflectionExtension::__construct(string name)
5794
5618
Constructor. Throws an Exception in case the given extension does not exist */
5795
5619
ZEND_METHOD (reflection_extension , __construct )
@@ -6137,14 +5961,6 @@ ZEND_METHOD(reflection_extension, isTemporary)
6137
5961
}
6138
5962
/* }}} */
6139
5963
6140
- /* {{{ proto public static mixed ReflectionZendExtension::export(string name [, bool return]) throws ReflectionException
6141
- * Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
6142
- ZEND_METHOD (reflection_zend_extension , export )
6143
- {
6144
- _reflection_export (INTERNAL_FUNCTION_PARAM_PASSTHRU , reflection_zend_extension_ptr , 1 );
6145
- }
6146
- /* }}} */
6147
-
6148
5964
/* {{{ proto public void ReflectionZendExtension::__construct(string name)
6149
5965
Constructor. Throws an Exception in case the given Zend extension does not exist */
6150
5966
ZEND_METHOD (reflection_zend_extension , __construct )
@@ -6390,7 +6206,6 @@ static const zend_function_entry reflection_exception_functions[] = {
6390
6206
6391
6207
static const zend_function_entry reflection_functions [] = {
6392
6208
ZEND_ME (reflection , getModifierNames , arginfo_class_Reflection_getModifierNames , ZEND_ACC_PUBLIC |ZEND_ACC_STATIC )
6393
- ZEND_DEP_ME (reflection , export , arginfo_class_Reflection_export , ZEND_ACC_PUBLIC |ZEND_ACC_STATIC )
6394
6209
PHP_FE_END
6395
6210
};
6396
6211
@@ -6432,7 +6247,6 @@ static const zend_function_entry reflection_function_abstract_functions[] = {
6432
6247
static const zend_function_entry reflection_function_functions [] = {
6433
6248
ZEND_ME (reflection_function , __construct , arginfo_class_ReflectionFunction___construct , 0 )
6434
6249
ZEND_ME (reflection_function , __toString , arginfo_class_ReflectionFunction___toString , 0 )
6435
- ZEND_DEP_ME (reflection_function , export , arginfo_class_ReflectionFunction_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6436
6250
ZEND_ME (reflection_function , isDisabled , arginfo_class_ReflectionFunction_isDisabled , 0 )
6437
6251
ZEND_ME (reflection_function , invoke , arginfo_class_ReflectionFunction_invoke , 0 )
6438
6252
ZEND_ME (reflection_function , invokeArgs , arginfo_class_ReflectionFunction_invokeArgs , 0 )
@@ -6452,7 +6266,6 @@ static const zend_function_entry reflection_generator_functions[] = {
6452
6266
};
6453
6267
6454
6268
static const zend_function_entry reflection_method_functions [] = {
6455
- ZEND_DEP_ME (reflection_method , export , arginfo_class_ReflectionMethod_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6456
6269
ZEND_ME (reflection_method , __construct , arginfo_class_ReflectionMethod___construct , 0 )
6457
6270
ZEND_ME (reflection_method , __toString , arginfo_class_ReflectionMethod___toString , 0 )
6458
6271
ZEND_ME (reflection_method , isPublic , arginfo_class_ReflectionMethod_isPublic , 0 )
@@ -6475,7 +6288,6 @@ static const zend_function_entry reflection_method_functions[] = {
6475
6288
6476
6289
static const zend_function_entry reflection_class_functions [] = {
6477
6290
ZEND_ME (reflection , __clone , arginfo_class_ReflectionClass___clone , ZEND_ACC_PRIVATE |ZEND_ACC_FINAL )
6478
- ZEND_DEP_ME (reflection_class , export , arginfo_class_ReflectionClass_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6479
6291
ZEND_ME (reflection_class , __construct , arginfo_class_ReflectionClass___construct , 0 )
6480
6292
ZEND_ME (reflection_class , __toString , arginfo_class_ReflectionClass___toString , 0 )
6481
6293
ZEND_ME (reflection_class , getName , arginfo_class_ReflectionClass_getName , 0 )
@@ -6532,14 +6344,12 @@ static const zend_function_entry reflection_class_functions[] = {
6532
6344
};
6533
6345
6534
6346
static const zend_function_entry reflection_object_functions [] = {
6535
- ZEND_DEP_ME (reflection_object , export , arginfo_class_ReflectionObject_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6536
6347
ZEND_ME (reflection_object , __construct , arginfo_class_ReflectionObject___construct , 0 )
6537
6348
PHP_FE_END
6538
6349
};
6539
6350
6540
6351
static const zend_function_entry reflection_property_functions [] = {
6541
6352
ZEND_ME (reflection , __clone , arginfo_class_ReflectionProperty___clone , ZEND_ACC_PRIVATE |ZEND_ACC_FINAL )
6542
- ZEND_DEP_ME (reflection_property , export , arginfo_class_ReflectionProperty_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6543
6353
ZEND_ME (reflection_property , __construct , arginfo_class_ReflectionProperty___construct , 0 )
6544
6354
ZEND_ME (reflection_property , __toString , arginfo_class_ReflectionProperty___toString , 0 )
6545
6355
ZEND_ME (reflection_property , getName , arginfo_class_ReflectionProperty_getName , 0 )
@@ -6564,7 +6374,6 @@ static const zend_function_entry reflection_property_functions[] = {
6564
6374
6565
6375
static const zend_function_entry reflection_class_constant_functions [] = {
6566
6376
ZEND_ME (reflection , __clone , arginfo_class_ReflectionClassConstant___clone , ZEND_ACC_PRIVATE |ZEND_ACC_FINAL )
6567
- ZEND_DEP_ME (reflection_class_constant , export , arginfo_class_ReflectionClassConstant_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6568
6377
ZEND_ME (reflection_class_constant , __construct , arginfo_class_ReflectionClassConstant___construct , 0 )
6569
6378
ZEND_ME (reflection_class_constant , __toString , arginfo_class_ReflectionClassConstant___toString , 0 )
6570
6379
ZEND_ME (reflection_class_constant , getName , arginfo_class_ReflectionClassConstant_getName , 0 )
@@ -6580,7 +6389,6 @@ static const zend_function_entry reflection_class_constant_functions[] = {
6580
6389
6581
6390
static const zend_function_entry reflection_parameter_functions [] = {
6582
6391
ZEND_ME (reflection , __clone , arginfo_class_ReflectionParameter___clone , ZEND_ACC_PRIVATE |ZEND_ACC_FINAL )
6583
- ZEND_DEP_ME (reflection_parameter , export , arginfo_class_ReflectionParameter_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6584
6392
ZEND_ME (reflection_parameter , __construct , arginfo_class_ReflectionParameter___construct , 0 )
6585
6393
ZEND_ME (reflection_parameter , __toString , arginfo_class_ReflectionParameter___toString , 0 )
6586
6394
ZEND_ME (reflection_parameter , getName , arginfo_class_ReflectionParameter_getName , 0 )
@@ -6624,7 +6432,6 @@ static const zend_function_entry reflection_union_type_functions[] = {
6624
6432
6625
6433
static const zend_function_entry reflection_extension_functions [] = {
6626
6434
ZEND_ME (reflection , __clone , arginfo_class_ReflectionExtension___clone , ZEND_ACC_PRIVATE |ZEND_ACC_FINAL )
6627
- ZEND_DEP_ME (reflection_extension , export , arginfo_class_ReflectionExtension_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6628
6435
ZEND_ME (reflection_extension , __construct , arginfo_class_ReflectionExtension___construct , 0 )
6629
6436
ZEND_ME (reflection_extension , __toString , arginfo_class_ReflectionExtension___toString , 0 )
6630
6437
ZEND_ME (reflection_extension , getName , arginfo_class_ReflectionExtension_getName , 0 )
@@ -6643,7 +6450,6 @@ static const zend_function_entry reflection_extension_functions[] = {
6643
6450
6644
6451
static const zend_function_entry reflection_zend_extension_functions [] = {
6645
6452
ZEND_ME (reflection , __clone , arginfo_class_ReflectionZendExtension___clone , ZEND_ACC_PRIVATE |ZEND_ACC_FINAL )
6646
- ZEND_DEP_ME (reflection_zend_extension , export , arginfo_class_ReflectionZendExtension_export , ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
6647
6453
ZEND_ME (reflection_zend_extension , __construct , arginfo_class_ReflectionZendExtension___construct , 0 )
6648
6454
ZEND_ME (reflection_zend_extension , __toString , arginfo_class_ReflectionZendExtension___toString , 0 )
6649
6455
ZEND_ME (reflection_zend_extension , getName , arginfo_class_ReflectionZendExtension_getName , 0 )
0 commit comments