mirror of
https://github.com/php/php-src.git
synced 2026-03-29 19:52:20 +02:00
- Add reflection helpers
This commit is contained in:
@@ -107,6 +107,20 @@ ZEND_API zend_function *zend_get_closure_invoke_method(zval *obj TSRMLS_DC) /* {
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API const zend_function *zend_get_closure_method_def(zval *obj TSRMLS_DC)
|
||||
{
|
||||
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
|
||||
return &closure->func;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zval* zend_get_closure_this_ptr(zval *obj TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
|
||||
return closure->this_ptr;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static zend_function *zend_closure_get_method(zval **object_ptr, zstr method_name, int method_len TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
unsigned int lc_name_len;
|
||||
|
||||
@@ -33,6 +33,8 @@ extern ZEND_API zend_class_entry *zend_ce_closure;
|
||||
ZEND_API void zend_create_closure(zval *res, zend_function *op_array, zend_class_entry *scope, zval *this_ptr TSRMLS_DC);
|
||||
ZEND_API int zend_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval **zobj_ptr TSRMLS_DC);
|
||||
ZEND_API zend_function *zend_get_closure_invoke_method(zval *obj TSRMLS_DC);
|
||||
ZEND_API const zend_function *zend_get_closure_method_def(zval *obj TSRMLS_DC);
|
||||
ZEND_API zval* zend_get_closure_this_ptr(zval *obj TSRMLS_DC);
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user