ReflectionGenerator
final class ReflectionGenerator (View source)
The ReflectionGenerator class reports information about a generator.
Methods
Gets the currently executing line of the generator
Gets the file name of the currently executing generator
Gets the trace of the executing generator
Gets the function name of the generator
Gets the function name of the generator
Gets the executing Generator object
Checks if execution finished
Details
__construct(Generator $generator)
Constructs a ReflectionGenerator object
int
getExecutingLine()
Gets the currently executing line of the generator
string
getExecutingFile()
Gets the file name of the currently executing generator
array
getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT)
Gets the trace of the executing generator
ReflectionFunctionAbstract
getFunction()
Gets the function name of the generator
object|null
getThis()
Gets the function name of the generator
Generator
getExecutingGenerator()
Gets the executing Generator object
bool
isClosed()
Checks if execution finished
Returns whether the execution reached the end of the function, a return statement or if an exception was thrown.