render template
@param string $template
@param array  $data

@return ResponseInterface
18643
final public function render($template=null, $data=null)
    {
        $renderType = $this->getRenderType();
        switch ($renderType) {
            case 'json':
                $this->renderJson($data);
                break;
            case 'xml':
                $this->renderXml($data);
                break;
            case 'html':
                $this->renderHtml($template, $data);
                break;
            default:
                $string = print_r($data, true);
                $this->renderText($string);
                break;
        }
        
        return $this->response;
    }
440104
public function render($name, $data = null)
  {
    $t = $this->template($name, $data);

    return $t->render();
  }
10723
public function render($template, $data = array()) {
		if(!is_null($this->layout) && $this->enabled === TRUE) { // Render the layout!!
			$this->setLayoutData('content', parent::render($template, array_merge($this->layoutData, (array)$data)));
			$this->setLayoutData('js', $this->jsAssets->render());
			$this->setLayoutData('css', $this->cssAssets->render());
			$this->setLayoutData('title', $this->titleParts->render());

			return parent::render($this->layout, $this->layoutData);
		} else {
			return parent::render($template, $data);
		}
	}
1118693
public function render($template, $data = [], array $options = []) {
		$defaults = ['context' => []];
		$options += $defaults;

		$context = [];
		$this->_context = $options['context'] + $this->_context;

		foreach (array_keys($this->_context) as $key) {
			$context[$key] = $this->__get($key);
		}
		$data = array_merge($this->_toString($context), $this->_toString($data));
		return Text::insert($template, $data, $options);
	}
901996
public function display($template, $data = NULL)
    {
        $app = App::getInstance();
        $data = $this->data->all();
        unset($data['flash']);
        unset($data['app']);
        foreach (array_keys($data) as $key) {
            if ($key[0] === '_') {
                unset($data[$key]);
            }
        }

        $app->response->headers['content-type'] = $this->contentType;
        echo \JsonKit\JsonKit::encode($data);
    }
1299037
public function makeHtml($template, $data=null)
	{
		$content = $this->render($template, $data);
		return File::write($this->getHtmlFile($template), $content); 
	}
356909
public function renderString(string $template, array $data = [])
    {
        try {
            return $this->loadFromString($template)->render($data);
        } catch (SyntaxError $e) {
            if ($this->exceptionHandler) {
                $e->setTemplateContent($template);

                return $this->renderSyntaxError($e);
            } else {
                throw $e;
            }
        }
    }
1267502
public static function Render($template=null, $data=null)
    {
        if ($template && $data) {
            return self::$renderer->render($template, $data);
        } else {
            self::$data = self::getData();
            self::$templates[] = "index";
            self::loadTemplate(self::$templates);
        }
    }
186565
public function compile($template, $data = array())
    {
        $compiler = new BladeCompiler($this->files, 'theme');

        // Get blade compiler.
        $parsed = $compiler->compileString($template);

        ob_start() and extract($data, EXTR_SKIP);
        try {
            eval('?>'.$parsed);
        } catch (\Exception $e) {
            ob_end_clean(); throw $e;
        }
        $template = ob_get_contents();
        ob_end_clean();

        return $template;
    }
242483
public function render($template)
    {
        $this->setTemplate($template);
        extract($this->data);
        ob_start();
        require $this->templatePath;

        return ob_get_clean();
    }
945529
public function render(View $template, array $data = array())
    {
        if (! empty($this->data)) {
            $data = array_merge($this->data, $data);
        }

        // Load file into string
        $source = file_get_contents($template->getFullPath());

        if ($source === false) {
            throw new FileNotFoundException("View file '" . $template->getFullPath() . "' is not found!"); // @codeCoverageIgnore
        }

        return $this->environment->render($template->getPath(), $data);
    }
75200
public function fetch($template, $data = array())
    {
        $view = $this->render($template, $data);

        return ($view) ? $view->render() : '';
    }
163730
public function mail($template, $data = array(), &$css = array())
    {
        $this->twig->addFunction(new \Twig_SimpleFunction('css', function ($file) use (&$css) {
            $css[] = $file;
        }));
        $template = $this->twig->loadTemplate($template);
        return $template->render($data);
    }
542647
public static function render($template, $data = [])
    {
        // @var \Illuminate\View\Factory $factory
        $factory = self::instance()->view();

        // @var \Illuminate\Contracts\View\View $view
        $view = $factory->make($template, $data);

        return $view->render();
    }
1356190
public function view($template, $data = array())
    {
        return $this->html($this->container->view($template, $data));
    }
182903
public function useTwigTemplate($template, array $data = array())
	{
		$html = $this->renderer->render($template, $data);
		$this->setHtml($html);
		return $this;
	}
546238
public function found(array $data): Response
    {
        $view = $data['view'] ?? '';
        $templateVars = $data['vars'] ?? [];
        $this->response->setBody(
            $this->renderer->render($view, $templateVars)
        );
        return $this->response;
    }