public function render(string $view, array $data = [], $layout = null): string
    {
        $output = $this->fetch($view, $data);

        // False - will disable use layout file
        if ($layout === false) {
            return $output;
        }

        return $this->renderContent($output, $data, $layout);
    }
public function render(string $view, array $data = [], $layout = null): string
    {
        $output = $this->fetch($view, $data);

        // False - will disable use layout file
        if ($layout === false) {
            return $output;
        }

        return $this->renderContent($output, $data, $layout);
    }
public function render ( string $ view , array $ data = [ ] , $ layout = null ) : string { $ output = $ this -> fetch ( $ view , $ data ) ; // False - will disable use layout file if ( $ layout === false ) { return $ output ; } return $ this -> renderContent ( $ output , $ data , $ layout ) ; }
Render a view, if layout file is setting, will use it.
throws RuntimeException if view file does not exist

@param string            $view
@param array             $data   extract data to view, cannot contain view as a key
@param string|null|false $layout Override default layout file
@return string
@throws \Throwable
Render a view if layout file is setting will use it . throws RuntimeException if view file does not exist