public static function renderView($path, $dataName = '', $data = '')
    {
        $view = new self();
        if (!empty($dataName)) {
            $view->with($dataName, $data);
        }

        return $view->render($path, false);
    }
public static function renderView($path, $dataName = '', $data = '')
    {
        $view = new self();
        if (!empty($dataName)) {
            $view->with($dataName, $data);
        }

        return $view->render($path, false);
    }
public static function renderView ( $ path , $ dataName = '' , $ data = '' ) { $ view = new self ( ) ; if ( ! empty ( $ dataName ) ) { $ view -> with ( $ dataName , $ data ) ; } return $ view -> render ( $ path , false ) ; }
Static function to render a view.

@param string $path
@param string $data
@param string $data

@return mixed
Static function to render a view .