Render partial

@access public

@param string $view view name

@return string
@throws Exception
487619
public function renderPartial($view)
    {
        $lay = $this->layout;
        $wi = $this->view;

        $this->layout = null;
        $this->view = $view;
        $output = $this->render();
        $this->layout = $lay;
        $this->view = $wi;

        return $output;
    }
297873
public static function view($type, $view)
    {
        if ($view !== null && View::exists($view) === false) {
            throw new Exception($view . ' view is not found', 2);
        }

        $callRender = array( '\\' . get_called_class(), 'render' . ucfirst($type) );

        switch ($type) {
            case 'error':
                self::$views[$type] = $view;
                App::on('error', $callRender);

                if (empty(self::$displayErrors)) {
                    self::$displayErrors = ini_get('display_errors');

                    function_exists('ini_set') && ini_set('display_errors', '0');
                }
                break;

            case 'classes':
            case 'performance':
                self::$views[$type] = $view;
                App::on('terminate', $callRender);
                break;

            case 'before':
                self::$views[$type] = $view;
                break;

            default:
                throw new Exception($type . ' is not valid event', 2);
        }
    }
1056184
private function generateView($view)
    {
        return $this->indenter
            ->indent(view('scaffold-interface::template.views.'.$this->parser->getTemplate().'.'.$view,
                ['parser' => $this->parser, 'dataSystem' => $this->dataSystem])->render());
    }
585206
protected function render($view)
    {
        $view = parent::render($view);
        if (!\Staq\Util::isStack($view, 'Stack\\View')) {
            $page = new \Stack\View;
            $page['content'] = $view;
            $view = $page;
        }
        return $view->render();
    }
256708
public function render($view = null, $data = array())
    {
        if (is_null($view)) {
            $view = static::$defaultSimpleView;
        }

        $data = array_merge($data, array(
            'paginator' => $this,
        ));

        return new HtmlString(
            static::viewFactory()->make($view, $data)->render()
        );
    }
774731
public function render($view, array $data = [])
    {
        // First we need to parse the view, which could either be a string or an array
        // containing both an HTML and plain text versions of the view which should
        // be used when sending an e-mail. We will extract both of them out here.
        [$view, $plain, $raw] = $this->parseView($view);

        $data['message'] = $this->createMessage();

        return $this->renderView($view ?: $plain, $data);
    }
799134
public function render(): string
    {
        $variables_for_view = $this->data + self::$shared_data;
        extract($variables_for_view, EXTR_SKIP);

        try {
            ob_start();
            // Do not use require, so we can catch errors for missing files
            include $this->getFilenameForView($this->name);

            return ob_get_clean();
        } catch (Throwable $ex) {
            ob_end_clean();
            throw $ex;
        }
    }
72882
public function render($view): string
    {
        if (!($view instanceof IView)) {
            return $view;
        }

        $path = $this->resolveViewName($view->viewName());

        if ($path === null) {
            return '';
        }

        $engine = $this->resolver->resolve($path);

        return $engine->build($path, $view->viewVariables());
    }
417134
private function getResponse(View $view)
    {
        return $this->templateEngine->renderResponse($this->template, $view->getParams());
    }
1013152
public function render(string $view, array $with = null): string
    {
        $path = $this->getViewPath($view);

        if (!file_exists($path)) {
            throw new ResponseException("View ({$view}) not found on path={$path}");
        }

        if ($with !== null && count($with) > 0) {
            foreach ($with as $variableName => $value) {
                if (!is_string($variableName)) {
                    throw new ResponseException('Invalid argument name, expected string, got ' . gettype($variableName));
                }

                $$variableName = $value;
            }
        }

        ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE | PHP_OUTPUT_HANDLER_FLUSHABLE | PHP_OUTPUT_HANDLER_REMOVABLE);

        require $path;

        return ob_get_clean();
    }
797205
protected function renderView(array $view)
    {
        if (!array_key_exists('view', $view)) {
            return "";
        }
        $options = (array_key_exists('options', $view)) ? $view['options'] : array();

        return $this->templating->render($view['view'], $options);
    }
249886
public function render( $view, $view_suffix = '' ) {
		$this->view        = $view;
		$this->view_suffix = $view_suffix;

		if ( is_singular() ) {
			$this->_render_loop();
		} else {
			$this->_render_direct();
		}
	}
989313
public function showFlash($view)
    {
        if (!$this->session->has('notify')) {
            return '';
        }

        $args = ['view' => $view] + $this->session->get('notify');

        return call_user_func_array([$this, 'show'], $args);
    }
795009
public function render($view, $values = array())
    {
        // Setup the template path
        $folder = $this->app->config('templates.path');
        $view = $folder . $view . '.php';

        // Check if the template exists
        if (!file_exists($view)) {
            throw new \Exception('Template not found: ' . $view, 404);
        }

        // Extract values and include template
        extract($values);
        ob_start();
        include $view;
        $html = ob_get_contents();
        ob_end_clean();

        // Return rendered HTML
        return $html;
    }
328362
protected function renderView($view, $data)
    {
        return $view instanceof Htmlable
                        ? $view->toHtml()
                        : $this->views->make($view, $data)->render();
    }
56057
public function renderViewElement(View $view): ?string
    {
        if (empty($this->viewElement)) {
            return null;
        }

        return call_user_func_array([$view, 'element'], $this->viewElement);
    }
522383
public function render($exception)
    {
        for ($level = ob_get_level(); $level > 0; $level--) {
            ob_end_clean();
        }

        if ($this->configure->debug) {
            if ($this->renderer->exists('@views/Errors/debug')) {
                return $this->renderer->render('@views/Errors/debug', ['exception' => $exception]);
            } else {
                return $this->renderer->render('@manaphp/Mvc/ErrorHandler/Views/debug', ['exception' => $exception]);
            }
        }

        $statusCode = $exception instanceof \ManaPHP\Exception ? $exception->getStatusCode() : 500;

        foreach (["@views/Errors/$statusCode",
                     '@views/Errors/error'] as $template) {
            if ($this->renderer->exists($template)) {
                return $this->renderer->render($template, ['statusCode' => $statusCode, 'exception' => $exception]);
            }
        }
        $status = $this->response->getStatus();
        return "<html lang='en'><title>$status</title><body>$status</body></html>";
    }