0 follower

Final Class Yiisoft\Yii\Debug\Collector\VarDumperHandlerInterfaceProxy

InheritanceYiisoft\Yii\Debug\Collector\VarDumperHandlerInterfaceProxy
ImplementsYiisoft\VarDumper\HandlerInterface
Uses TraitsYiisoft\Yii\Debug\ProxyDecoratedCalls

Method Details

Hide inherited methods

__call() public method
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);
}

            
__construct() public method

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,
) {
}

            
__get() public method
public __get( string $name ): mixed
$name string

                public function __get(string $name)
{
    return $this->decorated->$name;
}

            
__set() public method
public __set( string $name, mixed $value ): void
$name string
$value mixed

                public function __set(string $name, mixed $value): void
{
    $this->decorated->$name = $value;
}

            
handle() public method

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);
}