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


PHP Zend_View_Interface::doctype方法代码示例

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


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

示例1: isXhtml

 /**
  *
  */
 public function isXhtml($doctype = null)
 {
     if (empty($doctype)) {
         $doctype = $this->view->doctype();
     }
     if (strpos($doctype, 'XHTML')) {
         return ' xmlns="http://www.w3.org/1999/xhtml"';
     } else {
         return null;
     }
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:14,代码来源:IsXhtml.php

示例2: getView

 /**
  * Retrieve view object
  *
  * @return Zend_View
  */
 public function getView()
 {
     if (null === $this->_view) {
         $options = $this->getOptions();
         $this->_view = new Zend_View($options);
         if (isset($options['doctype'])) {
             $this->_view->doctype()->setDoctype(strtoupper($options['doctype']));
         }
     }
     return $this->_view;
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:16,代码来源:View.php

示例3: __toString

    /**
     * String representation of dojo environment
     *
     * @return string
     */
    public function __toString()
    {
        if (!$this->isEnabled()) {
            return '';
        }

        $this->_isXhtml = $this->view->doctype()->isXhtml();

        if (Zend_Dojo_View_Helper_Dojo::useDeclarative()) {
            if (null === $this->getDjConfigOption('parseOnLoad')) {
                $this->setDjConfigOption('parseOnLoad', true);
            }
        }

        if (!empty($this->_dijits)) {
            $this->registerDijitLoader();
        }

        $html  = $this->_renderStylesheets() . PHP_EOL
               . $this->_renderDjConfig() . PHP_EOL
               . $this->_renderDojoScriptTag() . PHP_EOL
               . $this->_renderLayers() . PHP_EOL
               . $this->_renderExtras();
        return $html;
    }
开发者ID:padraic,项目名称:framework-benchs,代码行数:30,代码来源:Container.php

示例4: getView

 /**
  * Retrieve view object
  *
  * @return Zend_View
  */
 public function getView()
 {
     if (null === $this->_view) {
         $options = $this->getOptions();
         $this->_view = new Zend_View($options);
         if (isset($options['doctype'])) {
             $this->_view->doctype()->setDoctype(strtoupper($options['doctype']));
             if (isset($options['charset']) && $this->_view->doctype()->isHtml5()) {
                 $this->_view->headMeta()->setCharset($options['charset']);
             }
         }
         if (isset($options['contentType'])) {
             $this->_view->headMeta()->appendHttpEquiv('Content-Type', $options['contentType']);
         }
     }
     return $this->_view;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:22,代码来源:View.php

示例5: getView

 /**
  * Retrieve view object
  *
  * @return Zend_View
  */
 public function getView()
 {
     if (null === $this->_view) {
         $options = $this->getOptions();
         $this->_view = new Zend_View($options);
         if (isset($options['doctype'])) {
             $this->_view->doctype()->setDoctype(strtoupper($options['doctype']));
             if (isset($options['charset']) && $this->_view->doctype()->isHtml5()) {
                 $this->_view->headMeta()->setCharset($options['charset']);
             }
         }
         if (isset($options['contentType'])) {
             $this->_view->headMeta()->appendHttpEquiv('Content-Type', $options['contentType']);
         }
         if (isset($options['assign']) && is_array($options['assign'])) {
             foreach ($options['assign'] as $key => $value) {
                 $this->_view->assign($key, $value);
             }
         }
     }
     return $this->_view;
 }
开发者ID:Tony133,项目名称:zf-web,代码行数:27,代码来源:View.php

示例6: renderStylesheets

 /**
  * Render Bootstrap stylesheet(s)
  *
  * @return string
  */
 public function renderStylesheets()
 {
     $stylesheet = $this->_getStylesheet();
     if ($this->view instanceof \Zend_View_Abstract) {
         $closingBracket = $this->view->doctype()->isXhtml() ? ' />' : '>';
     } else {
         $closingBracket = ' />';
     }
     // disable the stylesheat loader for bootstrap now that it gets compiled with the style
     $style = '';
     //'<link rel="stylesheet" href="'.$stylesheet.'" type="text/css" media="screen"' . $closingBracket . PHP_EOL;
     if (\MUtil_Bootstrap::$fontawesome === true) {
         $fontawesomeStylesheet = $this->_getFontAwesomeStylesheet();
         $style .= '<link rel="stylesheet" href="' . $fontawesomeStylesheet . '" type="text/css"' . $closingBracket . PHP_EOL;
     }
     return $style;
 }
开发者ID:GemsTracker,项目名称:MUtil,代码行数:22,代码来源:Bootstrapper.php

示例7: render

 /**
  * Display the captcha
  *
  * @param Zend_View_Interface $view
  * @param mixed $element
  * @return string
  */
 public function render(Zend_View_Interface $view = null, $element = null)
 {
     $endTag = ' />';
     if ($view instanceof Zend_View_Abstract && !$view->doctype()->isXhtml()) {
         $endTag = '>';
     }
     return '<img width="' . $this->getWidth() . '" height="' . $this->getHeight() . '" alt="' . $this->getImgAlt() . '" src="' . $this->getImgUrl() . $this->getId() . $this->getSuffix() . '"' . $endTag;
 }
开发者ID:Yaoming9,项目名称:Projet-Web-PhP,代码行数:15,代码来源:Image.php

示例8: _renderStylesheets

 /**
  * Render jQuery stylesheets
  *
  * @return string
  */
 protected function _renderStylesheets()
 {
     if (($this->getRenderMode() & ZendX_JQuery::RENDER_STYLESHEETS) == 0) {
         return '';
     }
     foreach ($this->getStylesheets() as $stylesheet) {
         $stylesheets[] = $stylesheet;
     }
     if (empty($stylesheets)) {
         return '';
     }
     array_reverse($stylesheets);
     /*$style = '<style type="text/css">' . PHP_EOL
              . (($this->_isXhtml) ? '<!--' : '<!--') . PHP_EOL;
       foreach ($stylesheets as $stylesheet) {
           $style .= '    @import "' . $stylesheet . '";' . PHP_EOL;
       }
       $style .= (($this->_isXhtml) ? '-->' : '-->') . PHP_EOL
               . '</style>';*/
     $style = "";
     foreach ($stylesheets as $stylesheet) {
         if ($this->view instanceof Zend_View_Abstract) {
             $closingBracket = $this->view->doctype()->isXhtml() ? ' />' : '>';
         } else {
             $closingBracket = ' />';
         }
         $style .= '<link rel="stylesheet" href="' . $stylesheet . '" ' . 'type="text/css" media="screen"' . $closingBracket . PHP_EOL;
     }
     return $style;
 }
开发者ID:Zerone,项目名称:ImJob.org,代码行数:35,代码来源:Container.php

示例9: _renderStylesheets

 /**
  * Render jQuery stylesheets
  *
  * @return string
  */
 protected function _renderStylesheets()
 {
     if (0 == ($this->getRenderMode() & ZendX_JQuery::RENDER_STYLESHEETS)) {
         return '';
     }
     foreach ($this->getStylesheets() as $stylesheet) {
         $stylesheets[] = $stylesheet;
     }
     if (empty($stylesheets)) {
         return '';
     }
     array_reverse($stylesheets);
     $style = '';
     foreach ($stylesheets as $stylesheet) {
         if ($this->view instanceof Zend_View_Abstract) {
             $closingBracket = $this->view->doctype()->isXhtml() ? ' />' : '>';
         } else {
             $closingBracket = ' />';
         }
         $style .= '<link rel="stylesheet" href="' . $stylesheet . '" ' . 'type="text/css" media="screen"' . $closingBracket . PHP_EOL;
     }
     return $style;
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:28,代码来源:Container.php

示例10: _hidden

 /**
  * Creates a hidden element.
  *
  * We have this as a common method because other elements often
  * need hidden elements for their operation.
  *
  * @access protected
  *
  * @param $name The element name.
  *
  * @param $value The element value.
  *
  * @param $attribs Attributes for the element.
  *
  * @return string A hidden element.
  */
 protected function _hidden($name, $value = null, $attribs = null)
 {
     $endTag = $this->view->doctype()->isXhtml() ? ' />' : '>';
     return '<input type="hidden"' . ' name="' . $this->view->escape($name) . '"' . ' value="' . $this->view->escape($value) . '"' . $this->_htmlAttribs($attribs) . $endTag;
 }
开发者ID:Mendim,项目名称:gtv-resources,代码行数:21,代码来源:FormElement.php

示例11: __toString

 /**
  * String representation of jQuery environment
  *
  * @return string
  */
 public function __toString()
 {
     if (!$this->isEnabled()) {
         return '';
     }
     $this->_isXhtml = $this->view->doctype()->isXhtml();
     $html = $this->_renderStylesheets() . PHP_EOL . $this->_renderScriptTags() . PHP_EOL . $this->_renderExtras();
     return $html;
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:14,代码来源:Container.php


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