Final Class Yiisoft\Yii\Debug\Collector\VarDumperHandlerInterfaceProxy
| Inheritance | Yiisoft\Yii\Debug\Collector\VarDumperHandlerInterfaceProxy |
|---|---|
| Implements | Yiisoft\VarDumper\HandlerInterface |
| Uses Traits | Yiisoft\Yii\Debug\ProxyDecoratedCalls |
Public Methods
Method Details
Defined in: Yiisoft\Yii\Debug\ProxyDecoratedCalls::__call()
| public __call( string $name, array $arguments ): mixed | ||
| $name | string | |
| $arguments | array | |
public function __call(string $name, array $arguments)
{
/**
* @psalm-suppress MixedMethodCall
*/
return $this->decorated->$name(...$arguments);
}
| public __construct( \Yiisoft\VarDumper\HandlerInterface $decorated, Yiisoft\Yii\Debug\Collector\VarDumperCollector $collector ): mixed | ||
| $decorated | \Yiisoft\VarDumper\HandlerInterface | |
| $collector | Yiisoft\Yii\Debug\Collector\VarDumperCollector | |
public function __construct(
private readonly HandlerInterface $decorated,
private readonly VarDumperCollector $collector,
) {
}
Defined in: Yiisoft\Yii\Debug\ProxyDecoratedCalls::__get()
| public __get( string $name ): mixed | ||
| $name | string | |
public function __get(string $name)
{
return $this->decorated->$name;
}
Defined in: Yiisoft\Yii\Debug\ProxyDecoratedCalls::__set()
| public __set( string $name, mixed $value ): void | ||
| $name | string | |
| $value | mixed | |
public function __set(string $name, mixed $value): void
{
$this->decorated->$name = $value;
}
| public handle( mixed $variable, integer $depth, boolean $highlight = false ): void | ||
| $variable | mixed | |
| $depth | integer | |
| $highlight | boolean | |
public function handle(mixed $variable, int $depth, bool $highlight = false): void
{
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
$callStack = null;
foreach ($stack as $value) {
if (!isset($value['file'])) {
continue;
}
if (str_ends_with($value['file'], '/var-dumper/src/functions.php')) {
continue;
}
if (str_ends_with($value['file'], '/var-dumper/src/VarDumper.php')) {
continue;
}
$callStack = $value;
break;
}
/** @psalm-var array{file: string, line: int}|null $callStack */
$this->collector->collect(
$variable,
$callStack === null ? '' : $callStack['file'] . ':' . $callStack['line']
);
$this->decorated->handle($variable, $depth, $highlight);
}
Signup or Login in order to comment.