SourceRepresentation example

return Parser::TRIGGER_SUCCESS;
    }

    public function parse(&$var, Value &$o, int $trigger): void
    {
        if (!$var instanceof Throwable) {
            return;
        }

        $throw = new ThrowableValue($var);
        $throw->transplant($o);
        $r = new SourceRepresentation($var->getFile()$var->getLine());
        $r->showfilename = true;
        $throw->addRepresentation($r, 0);

        $o = $throw;
    }
}
if (isset($this->trace['args'][$param->position])) {
                            $this->trace['args'][$param->position]->name = $param->getName();
                        }
                    }
                }
            }
        }

        $this->clearRepresentations();

        if (isset($this->trace['file']$this->trace['line']) && \is_readable($this->trace['file'])) {
            $this->addRepresentation(new SourceRepresentation($this->trace['file']$this->trace['line']));
        }

        if ($this->trace['args']) {
            $args = new Representation('Arguments');
            $args->contents = $this->trace['args'];
            $this->addRepresentation($args);
        }

        if ($this->trace['object']) {
            $callee = new Representation('object');
            $callee->label = 'Callee object ['.$this->trace['object']->classname.']';
            
Home | Imprint | This part of the site doesn't use cookies.