public function runDump(Twig_Environment $env, $context)
    {
        if (!$env->isDebug()) {
            return;
        }

        $result = '';

        $count = func_num_args();
        if ($count == 2) {

            $this->variablePrefix = true;
            $vars = [];
            foreach ($context as $key => $value) {
                if (!$value instanceof Twig_Template) {
                    $vars[$key] = $value;
                }
            }

            $result .= $this->dump($vars, static::PAGE_CAPTION);

        }
        else {

            $this->variablePrefix = false;
            for ($i = 2; $i < $count; $i++) {

                $var = func_get_arg($i);

                if ($var instanceof ComponentBase) {
                    $caption = [static::COMPONENT_CAPTION, get_class($var)];
                }
                elseif (is_array($var)) {
                    $caption = static::ARRAY_CAPTION;
                }
                elseif (is_object($var)) {
                    $caption = [static::OBJECT_CAPTION, get_class($var)];
                }
                else {
                    $caption = [static::OBJECT_CAPTION, gettype($var)];
                }

                $result .= $this->dump($var, $caption);
            }

        }

        return $result;
    }