@@ -1550,6 +1550,23 @@ ZEND_METHOD(reflection_function, isClosure)
1550
1550
}
1551
1551
/* }}} */
1552
1552
1553
+ /* {{{ proto public bool ReflectionFunction::getClosureThis()
1554
+ Returns this pointer bound to closure */
1555
+ ZEND_METHOD (reflection_function , getClosureThis )
1556
+ {
1557
+ reflection_object * intern ;
1558
+ zend_function * fptr ;
1559
+ zval * closure_this ;
1560
+
1561
+ METHOD_NOTSTATIC_NUMPARAMS (reflection_function_abstract_ptr , 0 );
1562
+ GET_REFLECTION_OBJECT_PTR (fptr );
1563
+ if (intern -> obj ) {
1564
+ closure_this = zend_get_closure_this_ptr (intern -> obj TSRMLS_CC );
1565
+ RETURN_ZVAL (closure_this , 1 , 0 );
1566
+ }
1567
+ }
1568
+ /* }}} */
1569
+
1553
1570
/* {{{ proto public bool ReflectionFunction::isInternal()
1554
1571
Returns whether this is an internal function */
1555
1572
ZEND_METHOD (reflection_function , isInternal )
@@ -4927,25 +4944,26 @@ ZEND_END_ARG_INFO()
4927
4944
static const zend_function_entry reflection_function_abstract_functions [] = {
4928
4945
ZEND_ME (reflection , __clone , NULL , ZEND_ACC_PRIVATE |ZEND_ACC_FINAL )
4929
4946
PHP_ABSTRACT_ME (reflection_function , __toString , NULL )
4947
+ ZEND_ME (reflection_function , inNamespace , NULL , 0 )
4930
4948
ZEND_ME (reflection_function , isClosure , NULL , 0 )
4949
+ ZEND_ME (reflection_function , isDeprecated , NULL , 0 )
4931
4950
ZEND_ME (reflection_function , isInternal , NULL , 0 )
4932
4951
ZEND_ME (reflection_function , isUserDefined , NULL , 0 )
4933
- ZEND_ME (reflection_function , getName , NULL , 0 )
4934
- ZEND_ME (reflection_function , getFileName , NULL , 0 )
4935
- ZEND_ME (reflection_function , getStartLine , NULL , 0 )
4936
- ZEND_ME (reflection_function , getEndLine , NULL , 0 )
4952
+ ZEND_ME (reflection_function , getClosureThis , NULL , 0 )
4937
4953
ZEND_ME (reflection_function , getDocComment , NULL , 0 )
4938
- ZEND_ME (reflection_function , getStaticVariables , NULL , 0 )
4939
- ZEND_ME (reflection_function , returnsReference , NULL , 0 )
4940
- ZEND_ME (reflection_function , getParameters , NULL , 0 )
4941
- ZEND_ME (reflection_function , getNumberOfParameters , NULL , 0 )
4942
- ZEND_ME (reflection_function , getNumberOfRequiredParameters , NULL , 0 )
4954
+ ZEND_ME (reflection_function , getEndLine , NULL , 0 )
4943
4955
ZEND_ME (reflection_function , getExtension , NULL , 0 )
4944
4956
ZEND_ME (reflection_function , getExtensionName , NULL , 0 )
4945
- ZEND_ME (reflection_function , isDeprecated , NULL , 0 )
4946
- ZEND_ME (reflection_function , inNamespace , NULL , 0 )
4957
+ ZEND_ME (reflection_function , getFileName , NULL , 0 )
4958
+ ZEND_ME (reflection_function , getName , NULL , 0 )
4947
4959
ZEND_ME (reflection_function , getNamespaceName , NULL , 0 )
4960
+ ZEND_ME (reflection_function , getNumberOfParameters , NULL , 0 )
4961
+ ZEND_ME (reflection_function , getNumberOfRequiredParameters , NULL , 0 )
4962
+ ZEND_ME (reflection_function , getParameters , NULL , 0 )
4948
4963
ZEND_ME (reflection_function , getShortName , NULL , 0 )
4964
+ ZEND_ME (reflection_function , getStartLine , NULL , 0 )
4965
+ ZEND_ME (reflection_function , getStaticVariables , NULL , 0 )
4966
+ ZEND_ME (reflection_function , returnsReference , NULL , 0 )
4949
4967
{NULL , NULL , NULL }
4950
4968
};
4951
4969
0 commit comments