Lime\App::render PHP Méthode

render() public méthode

Render view.
public render ( String $____template, Array $_____slots = [] ) : String
$____template String Path to view
$_____slots Array Passed variables
Résultat String Rendered view
    public function render($____template, $_____slots = [])
    {
        $_____slots = array_merge($this->viewvars, $_____slots);
        $____layout = $this->layout;
        if (strpos($____template, ' with ') !== false) {
            list($____template, $____layout) = explode(' with ', $____template, 2);
        }
        if (strpos($____template, ':') !== false && ($____file = $this->path($____template))) {
            $____template = $____file;
        }
        $extend = function ($from) use(&$____layout) {
            $____layout = $from;
        };
        extract((array) $_____slots);
        ob_start();
        include $____template;
        $output = ob_get_clean();
        if ($____layout) {
            if (strpos($____layout, ':') !== false && ($____file = $this->path($____layout))) {
                $____layout = $____file;
            }
            $content_for_layout = $output;
            ob_start();
            include $____layout;
            $output = ob_get_clean();
        }
        return $output;
    }