public static function isHtmlView()
    {
        if (self::$_isHtmlView === NULL) {
            self::$_isHtmlView = false;

            $view = Registry::get('view');
            if ($view === NULL) {
                $template = ViewAbstract::getTemplateConfig();
                if (is_array($template)
                    and isset($template['type'])
                    and $template['type'] === ViewInterface::TYPE_HTML) {
                    self::$_isHtmlView = true;
                }
            } else if ($view instanceof View and $view->getType() == ViewInterface::TYPE_HTML) {
                self::$_isHtmlView = true;
            }
        }

        return self::$_isHtmlView;
    }