|
ReflectionFunctionAbstract::getClosureCalledClassReturns the class corresponding to static:: inside a closure Description
public ReflectionClassnull ReflectionFunctionAbstract::getClosureCalledClass()
Returns the class as a ReflectionClass that
corresponds to resolving the class name corresponding to ParametersThis function has no parameters. Return Values
Returns a ReflectionClass corresponding to the class
represented by ExamplesExample #1 Example showcasing difference between ReflectionFunctionAbstract::getClosureCalledClass, ReflectionFunctionAbstract::getClosureScopeClass, and ReflectionFunctionAbstract::getClosureThis with a closure in the object context
The above example will output: string(1) "A" string(1) "B" object(B)#1 (0) { } object(ReflectionClass)#4 (1) { ["name"]=> string(1) "A" } object(ReflectionClass)#4 (1) { ["name"]=> string(1) "B" } Example #2 Example showcasing difference between ReflectionFunctionAbstract::getClosureCalledClass, ReflectionFunctionAbstract::getClosureScopeClass, and ReflectionFunctionAbstract::getClosureThis with a static closure without an object context
The above example will output: string(1) "A" string(1) "B" NULL object(ReflectionClass)#4 (1) { ["name"]=> string(1) "A" } object(ReflectionClass)#4 (1) { ["name"]=> string(1) "B" } See Also
|