public static function renderTemplate($file, $args = [])
    {
        if (!empty($file)) {
            self::setFile($file);
            extract($args, EXTR_SKIP);
            if (file_exists(self::$file)) {
                ob_start();
                require_once self::$file;
            } else {
                throw new \Exception("Sorry, view file {$file} not exists", 404);
            }
        } else {
            throw new \Exception('Sorry, file much be provided', 404);
        }
    }
public static function renderTemplate($file, $args = [])
    {
        if (!empty($file)) {
            self::setFile($file);
            extract($args, EXTR_SKIP);
            if (file_exists(self::$file)) {
                ob_start();
                require_once self::$file;
            } else {
                throw new \Exception("Sorry, view file {$file} not exists", 404);
            }
        } else {
            throw new \Exception('Sorry, file much be provided', 404);
        }
    }
public static function renderTemplate ( $ file , $ args = [ ] ) { if ( ! empty ( $ file ) ) { self :: setFile ( $ file ) ; extract ( $ args , EXTR_SKIP ) ; if ( file_exists ( self :: $ file ) ) { ob_start ( ) ; require_once self :: $ file ; } else { throw new \ Exception ( "Sorry, view file {$file} not exists" , 404 ) ; } } else { throw new \ Exception ( 'Sorry, file much be provided' , 404 ) ; } }
Render a view template.

@param (string) $file Name of files.
@param (array)  $args Attributes.

@since 1.0.0

@return void
Render a view template .