Render the document

@param   boolean  $cache   If true, cache the output
@param   array    $params  Associative array of attributes
@return  The rendered data
509899
public function render($cache = false, $params = array())
	{
		// Get the feed type
		$type = \Request::getCmd('type', 'Rss');

		// Instantiate feed renderer and set the mime encoding
		$renderer = $this->loadRenderer(($type) ? $type : 'rss');

		if (!($renderer instanceof Renderer))
		{
			\App::abort(404, \Lang::txt('Resource Not Found'));
		}

		$this->setMimeEncoding($renderer->getContentType());

		// output
		// Generate prolog
		$data  = '<?xml version="1.0" encoding="' . $this->_charset . '"?>' . "\n";
		$data .= '<!-- generator="' . $this->getGenerator() . '" -->' . "\n";

		// Generate stylesheet links
		foreach ($this->_styleSheets as $src => $attr)
		{
			$data .= '<?xml-stylesheet href="' . $src . '" type="' . $attr['mime'] . '"?>' . "\n";
		}

		// Render the feed
		$data .= $renderer->render();

		parent::render();

		return $data;
	}
346257
public function render(array $array, string $key) {
    $result = null;

    if (is_array($array) && $key) {
      if (array_key_exists($key, $array)) {
        $result = $array[$key];
      }
    }

    return $result;
  }
347899
public function render($template)
    {
        $debug = defined('WP_DEBUG') ? WP_DEBUG : false;

        if (is_writable('/tmp')) {
            if (!is_dir(self::CACHE_DIR)) {
                mkdir(self::CACHE_DIR);
            }
            $cache = self::CACHE_DIR;
        } else {
            $cache = null;
        }

        Twig_Autoloader::register();

        $loader = new Twig_Loader_Filesystem([
            $this->paths->getThemeViewsDir(),
            $this->paths->getBaseViewsDir()
        ]);

        $twig = new Twig_Environment($loader, [
            'auto_reload'      => $debug,
            'cache'            => $cache,
            'charset'          => 'UTF-8',
            'debug'            => $debug,
            'strict_variables' => $debug
        ]);

        $view = $twig->loadTemplate(sprintf('%s.html.twig', $template));

        return $view->render([
            'view'  => new ViewModel($template),
            'posts' => new PostIterator(),
            'wp'    => new WordPressProxy()
        ]);
    }
497059
public static function render(ResponseInterface $response, $view, array $params = [])
    {
        return Application::getInstance()->view->render($response, $view, $params);
    }
562391
public function render($view, $params = [])
    {
        $this->createTwig();
        // We call addFunctions() here, because we must call addFunctions()
        // after loading CodeIgniter functions in a controller.
        $this->addFunctions();

        $view = $view . '.twig';

        return $this->twig->render($view, $params);
    }
29203
public function file($file, $params = array(), $sandbox=false) {

        if ($this->cachePath) {

            $cachedfile = $this->get_cached_file($file, $sandbox);

            if ($cachedfile) {

                ob_start();

                lexy_include_with_params($cachedfile, $params, $file);

                $output = ob_get_clean();

                return $output;
            }
        }


        return $this->execute(file_get_contents($file), $params, $sandbox, $file);
    }
1034292
public static function render_file($file, $params = array(), $sandbox=false){

        $obj = new self();

        return $obj->file($file, $params, $sandbox);
    }
412240
private function generateCacheKey($key, $params)
    {
        // If our parameters is an array
        // we need to do some work to it.
        if (is_array($params)) {
            // Sort array and maintain index
            asort($params);

            // Convert array to a query string
            $params = http_build_query($params);
        }

        return $key.'|'.$params;
    }
633942
public function render(string $name, array $params = []): string
    {
        $path = $this->finder->findTemplate($name);
        $params = array_merge($this->attributes, $params);

        return $this->engine->render($path, $params);
    }
661230
public function render($template, array $data = array(), $output = false)
    {
        foreach ($data as $k => $v) {
            $this->assign($k, $v);
        }
        ob_start();
        include $this->compiled($template);
        return $output ? ob_end_flush() : ob_get_clean();
    }
1333263
public function render($template = '')
    {
        $result = $template;
        if (is_array($template) || is_object($template)) {
            // Recursively go down into an object/array to tokenize.
            foreach ($result as &$val) {
                $val = $this->render($val);
            }
        } elseif (
            is_string($template)
            && strlen($template) >= self::TEMPLATE_MIN_LENGTH
            && false !== strpos($template, self::TOKEN_KEY_START)
            && false !== strpos($template, self::TOKEN_KEY_END)
        ) {
            if (isset($this->renderCache[$template])) {
                // Already tokenized this exact string.
                $result = $this->renderCache[$template];
            } else {
                // A new or non-tokenized string.
                $this->lastTemplate = $template;
                set_error_handler([$this, 'handleMustacheErrors'], E_WARNING | E_NOTICE);
                $result = $this->engine->render($template, $this->context);
                restore_error_handler();
                if (null !== $result && '' !== $result) {
                    // Store the result in cache for faster lookup later.
                    $this->renderCache[$template] = $result;
                }
            }
        }

        return $result;
    }
929474
public function render($data = array(), $params = array())
    {
        if ($this->controller->getTemplate() !== null) {
            foreach ($this->controller->filters as $filter) {
                $this->twig->addFilter($filter);
            }
            $this->twig->addGlobal('params', $params);
            $key = "twig" . microtime(true);
//            Debugbar::timer($key, $this->controller->getTemplate());
            $template = $this->twig->load($this->controller->getTemplate());
            $data = $template->render($this->getData($data));
//            Debugbar::stopTimer($key);
        }
        return $data;
    }
150992
public function render($path, array $placeholders = [], $context = null, $isAjax = false)
    {
        if (isset($context)) {
            $this->setContext($context);
        }
        $this->scopes[spl_object_hash($this)] = $this;
        list($cacheKey, $cacheExpire, $cacheTags) = $this->calculateCacheParams($placeholders);
        // Get cache
        if (($resultCache = $this->getCacheContent($cacheKey)) !== false) {

            return $resultCache;
        }
        $result = $this->renderInternal($path, $placeholders);
        if (!$isAjax) {
            $result = implode("\n", [$this->beginPage(), $this->beginBody(), $result, $this->endBody(), $this->endPage()]);
        }

        // Set cache
        $this->setCacheContent($cacheKey, $result, $cacheExpire, $cacheTags ?: []);

        return $result;
    }
490016
protected function _render($params) {
		foreach ($params as $name => $param) {
			if ($name === 'run' || empty($param['name'])) {
				continue;
			}
			$usage = (!empty($param['usage'])) ? trim($param['usage'], ' []') : $param['name'];
			$this->out($this->_pad($usage), 'option');

			if ($param['description']) {
				$this->out($this->_pad($param['description'], 2));
			}
			$this->nl();
		}
	}
653784
public function display($view, $params = [])
    {
        $CI =& get_instance();
        $CI->output->set_output($this->render($view, $params));
    }
153773
public function render()
    {
        $key = $this->getInputProcessor()->getUniqueRequestId();
        $caching_time = $this->config->getCachingTime();
        if ($caching_time && ($output = Cache::get($key))) {
            return $output;
        } else {
            $this->prepare();
            $provider = $this->config->getDataProvider();
            $provider->reset();
            $output = View::make(
                $this->getMainTemplate(),
                $this->getViewData()
            )->render();
            if ($caching_time) {
                Cache::put($key, $output, $caching_time);
            }
            return $output;
        }
    }
351270
public function renderString($template, array $params = null)
    {
        if (! empty($params)) {
            $this->assign($params);
        }

        $compiled = $this->getCompiler()->compile($template);

        $tempFile = tempnam(sys_get_temp_dir(), __FUNCTION__);

        $this->writeToFile($tempFile, $compiled);

        $template = $this->readBuffer($tempFile);

        unlink($tempFile);

        return $template;
    }