ThrowableValue example

public function getTriggers(): int
    {
        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;
    }
}
Home | Imprint | This part of the site doesn't use cookies.