MadelineProto/src/ReflectionGenerator.php

37 lines
908 B
PHP
Raw Normal View History

2019-06-20 20:21:31 +02:00
<?php
2019-09-02 17:08:36 +02:00
if (!\class_exists('ReflectionGenerator')) {
2019-06-20 20:21:31 +02:00
class ReflectionGenerator
{
private $generator;
public function __construct(Generator $generator)
{
$this->generator = $generator;
}
public function getExecutingFile(): string
{
return '';
}
public function getExecutingGenerator(): Generator
{
return $this->generator;
}
public function getExecutingLine(): int
{
return 0;
}
public function getFunction(): ReflectionFunctionAbstract
{
return new ReflectionFunction(function () {});
}
public function getThis(): object
{
return $this;
}
public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array
{
return [];
}
}
}