Builds the HTML used for each table row.
@param  mixed $key
@param  mixed $variable
@return string
436667
protected function makeTableRow($key, $variable)
    {
        $this->zebra = $this->zebra ? 0 : 1;
        $css = $this->getDataCss($variable);
        $output = [];
        $output[] = '<tr>';
        $output[] = '<td style="'.$css.';cursor:pointer" onclick="'.$this->evalToggleDumpOnClick().'">'.$this->evalKeyLabel($key).'</td>';
        $output[] = '<td style="'.$css.'">'.$this->evalVarLabel($variable).'</td>';
        $output[] = '<td style="'.$css.'">'.$this->evalVarDesc($variable, $key).'</td>';
        $output[] = '</tr>';
        $output[] = '<tr>';
        $output[] = '<td colspan="3">'.$this->evalVarDump($variable).'</td>';
        $output[] = '</tr>';
        return implode(PHP_EOL, $output);
    }
801526
protected function encode($var)
    {
        $string = '';
        foreach ($var as $key => $value) {
            $string .= $key . '="' .  preg_replace(
                    ['/"/', '/\\\/', "/\t/", "/\n/", "/\r/"],
                    ['\"',  '\\\\', '\t',   '\n',   '\r'],
                    $value
                ) . "\"\n";
        }
        return $string;
    }
807101
protected function make($name, $variables = [])
    {
        $view = new self($this->viewPath, $this->pluginManifestOfViews, $this->scope);

        return $view->render($name, $variables);
    }
489840
public function constructJavaScript($variables)
    {
        return $this->constructNamespace() . collect($variables)->map(function ($value, $name) {
            return $this->initializeVariable($name, $value);
        })->implode('');
    }
1215520
protected function evalVarDesc($variable, $key)
    {
        $type = $this->getType($variable);

        if ($type == 'method') {
            return $this->evalMethodDesc($variable);
        }

        if (isset($this->commentMap[$key])) {
            return $this->commentMap[$key];
        }

        if ($type == 'array') {
            return $this->evalArrDesc($variable);
        }

        if ($type == 'object') {
            return $this->evalObjDesc($variable);
        }

        return '';
    }
766856
public function tag($key, $default = '')
    {
        if (!($values = $this->get($key, $default))) {
            return '';
        }

        if (!is_array($values)) {
            $values = [$values];
        }

        $html = '';

        foreach ($this->config['tags'] as $tag) {
            $class = __NAMESPACE__.'\\Tags\\'.$tag;

            foreach ($values as $value) {
                $html .= $class::tag($key, $value);
            }
        }

        return $html;
    }
640246
protected function buildVariableHeader()
    {
        $buffer = "";
        $buffer .= chr($this->session_present);
        $buffer .= chr($this->return_code);
        return $buffer;
    }
351458
public function getTemplateContent($template, array $variables)
    {
        $dir = dirname($template);
        $file = basename($template);

        $twig = new \Twig_Environment(new \Twig_Loader_Filesystem(array($dir)), array(
            'debug'            => true,
            'cache'            => false,
            'strict_variables' => true,
            'autoescape'       => false,
        ));
        return $twig->render($file, $variables);
    }
287990
public static function toHtml($var, array $options = null): string
    {
        $options += [
            self::DEPTH => 4,
            self::TRUNCATE => 150,
            self::COLLAPSE => 14,
            self::COLLAPSE_COUNT => 7,
            self::OBJECT_EXPORTERS => null,
            self::DEBUGINFO => false,
            self::KEYS_TO_HIDE => [],
        ];
        $loc = &$options[self::LOCATION];
        $loc = $loc === true ? ~0 : (int) $loc;

        $options[self::KEYS_TO_HIDE] = \array_flip(\array_map('\\strtolower', $options[self::KEYS_TO_HIDE]));
        $options[self::OBJECT_EXPORTERS] = (array) $options[self::OBJECT_EXPORTERS] + self::$objectExporters;
        \uksort($options[self::OBJECT_EXPORTERS], function ($a, $b): int {
            return $b === '' || (\class_exists($a, false) && \is_subclass_of($a, $b)) ? -1 : 1;
        });

        $live = !empty($options[self::LIVE]) && $var && (\is_array($var) || \is_object($var) || \is_resource($var));
        [$file, $line, $code] = $loc ? self::findLocation() : null;
        $locAttrs = $file && $loc & self::LOCATION_SOURCE ? Helpers::formatHtml(
            ' title="%in file % on line %" data-tracy-href="%"', "$code\n", $file, $line,
            Helpers::editorUri($file, $line)
        ) : null;

        return '<pre class="tracy-dump' . ($live && $options[self::COLLAPSE] === true ? ' tracy-collapsed' : '') . '"'
            . $locAttrs
            . ($live ? " data-tracy-dump='" . \json_encode(self::toJson($var, $options),
                    JSON_HEX_APOS | JSON_HEX_AMP) . "'>" : '>')
            . ($live ? '' : self::dumpVar($var, $options))
            . ($file && $loc & self::LOCATION_LINK ? '<small>in ' . Helpers::editorLink($file, $line) . '</small>' : '')
            . "</pre>\n";
    }
62837
protected function prettifyArray(array $variable, int $tabCount): string
    {
        $encoder = new PHPEncoder();

        return $encoder->encode($variable, [
            'array.base' => $tabCount * 4,
            'array.inline' => true,
            'array.indent' => 4,
            'array.eol' => "\n",
        ]);
    }
372366
protected function _buildAttr($key, $val)
    {
        $return = null;
        if (!empty($val) || $val === '0' || $key === 'value') {
            $return = ' ' . $key . '="' . $val . '"';
        }

        return $return;
    }
1101835
public function addTable(string $key) : TomlBuilder
    {
        $this->exceptionIfKeyEmpty($key);
        $addPreNewline = $this->currentLine > 0 ? true : false;
        $keyParts = explode('.', $key);

        foreach ($keyParts as $keyPart) {
            $this->exceptionIfKeyEmpty($keyPart, "Table: \"{$key}\".");
            $this->exceptionIfKeyIsNotUnquotedKey($keyPart);
        }

        $line = "[{$key}]";
        $this->addTableKey($key);
        $this->append($line, true, false, $addPreNewline);

        return $this;
    }
1178918
public function render($key, RendererInterface $renderer = null)
	{
		if (!$this->hasMenu($key)) {
			return '';
		}

		return $this->renderMenu($this->getMenu($key), $renderer);
	}
79325
public function renderHtml($template, array $variables = [], $type = MailTypes::TYPE_ALL)
    {
        return $this->getMailRendered($template, $variables, $type)->getHtmlBody();
    }
656466
protected function export($var, $scope)
    {
        $out = '';
        foreach ($var as $i => $v) {
            if (is_array($v) || (is_object($v) && $v instanceof Iterator)) {
                $out .= $i . ' (' . (is_array($v) ? 'array' : 'object: ' . get_class($v)) . ')';
                if ($v === $scope) {
                    $out .= ' (current scope):<div style="background:#ccc;padding-left:20px;">' . $this->export($v, $scope) . '</div>';
                } else {
                    $out .= ':<div style="padding-left:20px;">' . $this->export($v, $scope) . '</div>';
                }
            } elseif (is_object($v)) {
                $out .= $this->exportObj($i . ' (object: ' . get_class($v) . '):', $v);
            } else {
                $out .= $this->exportVar($i . ' = ', $v);
            }
        }

        return $out;
    }
394606
public function toBody($var)
    {
        $results = '';

        foreach ($this->getColumns() as $column) {
            if (in_array($name = $column->getName(), $this->ignores)) {
                continue;
            }

            $results .= "\t\t\t\t\t".'<td>{!! $'.$var.'->'.$name.' !!}</td>'.PHP_EOL;
        }

        return $results;
    }
894648
protected function attributeElement($key, $value)
    {
        $html = self::getInstance()->html;
        $args = func_get_args();
        return call_user_func_array(array($html, __FUNCTION__), $args);
    }