当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_View::headMeta方法代码示例

本文整理汇总了PHP中Zend_View::headMeta方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View::headMeta方法的具体用法?PHP Zend_View::headMeta怎么用?PHP Zend_View::headMeta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_View的用法示例。


在下文中一共展示了Zend_View::headMeta方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _initView

 protected function _initView()
 {
     $options = $this->getOptions();
     if (!isset($options['resources']['view'])) {
         return;
     }
     $config = $options['resources']['view'];
     if (isset($config)) {
         $view = new Zend_View($config);
     } else {
         $view = new Zend_View();
     }
     $view->setUseStreamWrapper(true);
     if (isset($config['doctype'])) {
         $view->doctype($config['doctype']);
     }
     if (isset($config['language'])) {
         $view->headMeta()->appendName('language', $config['language']);
     }
     if (isset($config['charset'])) {
         $view->headMeta()->setCharset($config['charset'], 'charset');
     }
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     return $view;
 }
开发者ID:padraic,项目名称:ZFPlanet,代码行数:26,代码来源:Bootstrap.php

示例2: _initView

 public function _initView()
 {
     // Initialize view
     $view = new Zend_View();
     // Setup Helper Paths
     $view->setHelperPath(SM_LIB . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . 'Helper', 'Smallunch_lib_View_Helper');
     // Add Global Helper path (typically application/helpers
     $view->addHelperPath(GLOBAL_HELPER_DIR . DIRECTORY_SEPARATOR . 'View');
     // add per application helper path (typically application/(backend, frontend)/helpers
     $view->addHelperPath(APPLICATION_DIRECTORY . DIRECTORY_SEPARATOR . 'Helper' . DIRECTORY_SEPARATOR . 'View');
     // Setup layout
     if (isset($this->config->layout->doctype)) {
         $view->doctype($this->config->layout->doctype);
     }
     if (isset($this->config->default->title)) {
         $view->headTitle($this->config->default->title);
     }
     if (isset($this->config->default->meta_keywords)) {
         $view->headMeta($this->config->default->meta_keywords, 'keywords');
     }
     if (isset($this->config->default->meta_description)) {
         $view->headMeta($this->config->default->meta_description, 'description');
     }
     if (isset($this->config->layout->charset)) {
         $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=' . $this->config->layout->charset);
     }
     if (isset($this->config->layout->content_language)) {
         $view->headMeta()->appendHttpEquiv('Content-Language', $this->config->layout->content_language);
     }
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }
开发者ID:jeremymoorecom,项目名称:Smallunch,代码行数:35,代码来源:Bootstrap.php

示例3: setHeadMetas

 /**
  * Set <meta> elements
  *
  * @return void
  */
 public function setHeadMetas()
 {
     foreach ($this->getOptions() as $headMeta => $options) {
         $content = array_key_exists('content', $options) && isset($options['content']) ? $options['content'] : null;
         $keyValue = array_key_exists('keyValue', $options) && isset($options['keyValue']) ? $options['keyValue'] : null;
         $keyType = array_key_exists('keyType', $options) && isset($options['keyType']) ? $options['keyType'] : null;
         $modifiers = array_key_exists('modifiers', $options) && isset($options['modifiers']) ? $options['modifiers'] : array();
         $placement = array_key_exists('placement', $options) && isset($options['placement']) ? $options['placement'] : 'APPEND';
         $this->_view->headMeta($content, $keyValue, $keyType, $modifiers, $placement);
     }
 }
开发者ID:rockett,项目名称:parables,代码行数:16,代码来源:Headmetas.php

示例4:

 function _initViewHelpers()
 {
     $view = new Zend_View();
     $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
     $view->headMeta()->appendHttpEquiv('X-UA-Compatible', "IE=edge,chrome=1");
     $view->headMeta()->appendHttpEquiv('PRAGMA', "NO-CACHE");
     $view->headMeta()->setCharset('UTF-8');
     $view->headMeta()->appendName("viewport", "width=device-width,initial-scale=1.0");
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
 }
开发者ID:vmangla,项目名称:evendor,代码行数:12,代码来源:Bootstrap.php

示例5: getView

 public function getView()
 {
     if (null === $this->_view) {
         $options = $this->getOptions();
         $title = '';
         $doctype = '';
         $contentType = 'text/html; charset=iso-8859-1';
         if (array_key_exists('title', $options)) {
             $title = $options['title'];
             unset($options['title']);
         }
         if (isset($options['doctype'])) {
             $doctype = $options['doctype'];
             unset($options['doctype']);
         }
         if (isset($options['content-type'])) {
             $contentType = $options['content-type'];
             unset($options['content-type']);
         }
         $view = new Zend_View($options);
         $view->doctype($doctype);
         $view->headTitle($title);
         $view->headMeta()->setHttpEquiv('content-type', $contentType);
         $view->setHelperPath(LIBRARY_PATH . DS . 'Webbers/View/Helper', 'Webbers_View_Helper');
         $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
         $viewRenderer->setViewSuffix('inc');
         $viewRenderer->setView($view);
         $this->_view = $view;
     }
     return $this->_view;
 }
开发者ID:jager,项目名称:cms,代码行数:31,代码来源:View.php

示例6: _initView

 protected function _initView()
 {
     $options = $this->getOption('resources');
     if (isset($options['view'])) {
         $view = new Zend_View($options['view']);
     } else {
         $view = new Zend_View();
     }
     if (isset($options['view']['doctype'])) {
         $view->doctype($options['view']['doctype']);
     }
     if (isset($options['view']['contentType'])) {
         $view->headMeta()->appendHttpEquiv('Content-Type', $options['view']['contentType']);
     }
     /**
      * Default Title
      */
     $view->headTitle('IPMCore')->setSeparator(' - ');
     $rev = $options['view']['version'];
     /**
      * JavaScript. Also see Layout.phtml in app/layouts
      */
     $view->headScript()->appendFile('/js/jslibs.js', 'text/javascript')->appendFile('/js/ipmc/ipmcore.scripts_' . $rev . '.js', 'text/javascript');
     /**
      * CSS. Also see Layout.phtml in app/layouts
      */
     $view->headLink()->appendStylesheet('/css/print_' . $rev . '.css', 'print')->appendStylesheet('/css/screen_' . $rev . '.css', 'screen, projection')->appendStylesheet('/css/ie_' . $rev . '.css', 'screen, projection', 'IE')->appendStylesheet('/css/ipmcore_' . $rev . '.css');
     if (APPLICATION_ENV != 'production') {
         Zend_Registry::set('version', $options['view']['version']);
     }
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     return $view;
 }
开发者ID:Tony133,项目名称:zf-web,代码行数:34,代码来源:Bootstrap.php

示例7: _initView

    /**
     * Init view
     */
    protected function _initView()
    {
        $theme = 'default-ui';
        if (isset($_COOKIE["theme"])) {
            $theme = $_COOKIE["theme"];
        } elseif (isset($this->config->app->theme)) {
            $theme = $this->config->app->theme;
        }
        define('THEME', $theme);
        
        // Initialize view
		$_options = $this->getOptions();
        $view = new Zend_View();
        $view->doctype('HTML5');
        $view->headMeta()
			->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
			->appendHttpEquiv('X-UA-Compatible', 'IE=Edge');
        $view->headTitle($_options['app']['name'])->setSeparator(' - ');

        // Add it to the ViewRenderer
        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper(
            'ViewRenderer'
        );
        $viewRenderer->setView($view);
 
        // Return it, so that it can be stored by the bootstrap
        return $view;
    }
开发者ID:necrogami,项目名称:phpRackMonkey,代码行数:31,代码来源:Bootstrap.php

示例8: _setupHeadOptions

	/**
	 * Setup head block
	 * @return null
	 */
	protected function _setupHeadOptions()
	{
		// Défini le charset
		$this->_view->headMeta()->setHttpEquiv( 'Content-Type', 'text/html; charset=' . $this->_localOptions['encoding'] );
		// Défini le doctype
		$this->_view->doctype($this->_localOptions['doctype']);
	}
开发者ID:neotok,项目名称:PROJET1,代码行数:11,代码来源:View.php

示例9: preDispatch

 public function preDispatch()
 {
     $bootstrap = $this->getActionController()->getInvokeArg('bootstrap');
     $config = $bootstrap->getOptions();
     $module = $this->getRequest()->getModuleName();
     if (isset($config[$module]['resources']['layout']['layout'])) {
         $layoutScript = $config[$module]['resources']['layout']['layout'];
         $this->getActionController()->getHelper('layout')->setLayout($layoutScript);
     }
     if (isset($config[$module]['site'])) {
         $headtitle = $config[$module]['site']['headtitle'];
         $keywords = $config[$module]['site']['keywords'];
         $description = $config[$module]['site']['description'];
         $layout = $module . '.css';
         $favicon = $module . '/favicon.ico';
     } else {
         $headtitle = $config['site']['headtitle'];
         $keywords = $config['site']['keywords'];
         $description = $config['site']['description'];
         $layout = 'default.css';
         $favicon = 'favicon.ico';
     }
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->headTitle($headtitle);
     $view->headTitle()->setSeparator(' | ');
     $view->headLink()->prependStylesheet('/css/' . $layout)->headLink(array('rel' => 'favicon', 'href' => '/images/' . $favicon), 'PREPEND')->prependStylesheet('/css/reset.css')->appendStylesheet('/css/menu.css');
     $view->env = APPLICATION_ENV;
     $view->headMeta()->appendName('keyword', $keywords)->appendName('description', $description)->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('Content-Language', 'en-US');
 }
开发者ID:harleyflh75,项目名称:ZF_Framework,代码行数:30,代码来源:LayoutLoader.php

示例10: _responseHtml

 /**
  * _responseHtml
  *
  * @return void
  */
 private function _responseHtml()
 {
     $body = $this->_viewRenderer->getResponse()->getBody();
     $respHeader = "{$this->_view->doctype()}\n        <html>\n        <head>\n        {$this->_view->headMeta()}\n        {$this->_view->headTitle()}\n        {$this->_view->headStyle()}\n        {$this->_view->headLink()}\n        {$this->_view->headScript()}\n        {$this->_view->dojo()}\n        </head>";
     $respBody = "<body>{$body}</body>";
     $respFooter = "</html>";
     $this->_viewRenderer->getResponse()->setBody($respHeader . $respBody . $respFooter);
 }
开发者ID:BGCX261,项目名称:zlayer-svn-to-git,代码行数:13,代码来源:Abstract.php

示例11: _initView

 protected function _initView()
 {
     $view = new Zend_View();
     $cfg = $this->getOptions();
     $site = $cfg['site'];
     $view->doctype('HTML5');
     //        $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
     $view->headTitle()->prepend($site['name']);
     $view->headTitle()->setSeparator(' - ');
     $view->headMeta()->appendName('description', $site['meta']['description']);
     $view->headMeta()->appendName('keywords', $site['meta']['keywords']);
     $view->headMeta()->appendName('author', $site['meta']['author']);
     $view->env = APPLICATION_ENV;
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewRenderer->init();
     $viewRenderer->view->addHelperPath('My' . DS . 'View' . DS . 'Helper', 'My_View_Helper');
 }
开发者ID:agenciaaeh,项目名称:kahina,代码行数:17,代码来源:Bootstrap.php

示例12: _initView

 protected function _initView()
 {
     $view = new Zend_View();
     $view->doctype('HTML5');
     $view->headTitle()->setSeparator(' | ');
     $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
     $view->setHelperPath(APPLICATION_PATH . '/modules/admin/views/helpers/');
     $view->addHelperPath(APPLICATION_PATH . '/modules/public/views/helpers/');
     Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer')->setView($view);
 }
开发者ID:Rademade,项目名称:MedOptima,代码行数:10,代码来源:Bootstrap.php

示例13:

 function _initView()
 {
     $view = new Zend_View();
     $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset = utf-8');
     $view->headLink()->appendStylesheet(HOST_PROJECT . "/public/css/bootstrap.min.css");
     $view->headLink()->offsetSetStylesheet("2", HOST_PROJECT . "/public/css/bootstrap-theme.css");
     $view->headLink()->offsetSetStylesheet("3", HOST_PROJECT . "/public/css/style.css");
     $view->headScript()->appendFile(HOST_PROJECT . "/public/js/jquery-1.11.3.min.js");
     $view->headScript()->offsetSetFile("2", HOST_PROJECT . "/public/js/bootstrap.min.js");
     $view->headScript()->offsetSetFile("3", HOST_PROJECT . "/public/js/myscript.js");
 }
开发者ID:LongNguyen-51101909,项目名称:Zend1Example,代码行数:11,代码来源:Bootstrap.php

示例14: _initView

 protected function _initView()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_TRANSITIONAL');
     $view->setEncoding('UTF-8');
     $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('Content-Language', 'en-US');
     $view->headTitle('Chargify Sample App')->setSeparator(' | ');
     $view->addHelperPath('Crucial/View/Helper/', 'Crucial_View_Helper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
 }
开发者ID:RealTimeApps,项目名称:chargify-sample-app,代码行数:11,代码来源:Bootstrap.php

示例15: _initView

 protected function _initView()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_TRANSITIONAL');
     $view->headMeta()->appendHttpEquiv('Content-type', 'text/html;charset=utf-8');
     $view->headTitle('· Intermodels · Un deseo...hecho realidad · Modelos · Gogós · Azafatas · Agencia · Barcelona ·')->setSeparator(' - ');
     $view->headScript()->prependFile('http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js');
     $view->addHelperPath('Neo/View/Helper', 'Neo_View_Helper');
     $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     return $view;
 }
开发者ID:Neozeratul,项目名称:Intermodels,代码行数:13,代码来源:Bootstrap.php


注:本文中的Zend_View::headMeta方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。