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);
        }
    }