public function varDump($var)
    {
        if (is_callable($this->varDumpCallback)) {
            return call_user_func($this->varDumpCallback, $var, $this);
        }

        $message = VarDumper::dumpAsString($var, $this->depth, $this->highlight);

        //don't encode highlighted variables
        if (!$this->highlight) {
            $message = Html::encode($message);
        }

        return $message;
    }