public static function render($name, $params = array())
    {
        if (is_array($params)) {
            $params = new ViewData($params);
        }

        $templateClass = Primer::$TEMPLATE_CLASS;
        $template = new $templateClass(Primer::$VIEW_PATH, $name);

        Event::fire('view.' . $name, $params);

        return $template->render($params);
    }