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


PHP Zend_View_Abstract::render方法代码示例

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


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

示例1: render

 /**
  * Render a hook's content
  *
  * @param string $name template to use
  * @param string $module module to fetch template from
  * @param string $controller controller to fetch template from, defaults to 'hooks'
  *
  * @return string Rendered content
  *
  */
 public function render($name, $module, $controller = "hooks")
 {
     $layout = Zend_Layout::getMvcInstance();
     // Reset view script paths
     $this->view->setScriptPath(null);
     // Build new ones for hooks
     $this->view->addBasePath(ZfApplication::$_base_path . "/app/{$module}/views", $module . "_View");
     //$this->view->addScriptPath(ZfApplication::$_base_path."/app/$module/Views/");
     $this->view->addScriptPath($layout->getLayoutPath() . "default/templates/{$module}");
     $this->view->addScriptPath($layout->getLayoutPath() . $layout->getLayout() . "/templates/{$module}");
     return $this->view->render($controller . "/" . $name);
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:22,代码来源:Abstract.php

示例2: renderRegion

 /**
  * Render a panel region
  * @param array $region
  * @param array $blocks
  * @return string
  */
 function renderRegion($region, $blocks = array())
 {
     if ($blocks || $this->is_admin_page) {
         $rendered_blocks = array();
         if ($blocks) {
             foreach ($blocks as $block) {
                 $block->options['region'] = $region;
                 if (!$this->is_admin_page) {
                     $rendered_blocks[$block->id] = $block->render();
                 } else {
                     $rendered_blocks[$block->id] = $this->renderAdminBlock($block);
                 }
             }
         }
         $this->view->assign('region', $region);
         $this->view->assign('blocks', $rendered_blocks);
         if ($this->is_admin_page) {
             $template = "region_admin";
         } else {
             $template = "region_" . (isset($region['template']) && $region['template'] != "" ? $region['template'] : "standard");
         }
         return $this->view->render($template);
     }
     return "";
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:31,代码来源:Abstract.php

示例3: __toString

 public function __toString()
 {
     if (null === ($verb = $this->getParam('verb'))) {
         $this->_view->errors = array('badArgument' => 'Required verb is missing');
         return $this->_view->render('index/error.phtml');
     } else {
         try {
             try {
                 $this->checkParams($verb);
             } catch (OaiPmh_Exception $e) {
                 $this->_view->errors = array($e->getCodeAsString() => $e->getMessage());
                 return $this->_view->render('index/error.phtml');
             }
             try {
                 return $this->{$verb}();
             } catch (Exception $e) {
                 $this->_view->errors = array($e->getCodeAsString() => $e->getMessage());
                 return $this->_view->render('index/error.phtml');
             }
         } catch (OaiPmh_Exception $e) {
             $this->_view->errors = array($e->getCodeAsString() => $e->getMessage());
             return $this->_view->render('index/error.phtml');
         } catch (Exception $e) {
             $this->_view->errors = array('badArgument' => $e->getMessage());
             return $this->_view->render;
         }
     }
 }
开发者ID:olhsha,项目名称:OpenSKOS2tempMeertens,代码行数:28,代码来源:OaiPmh.php

示例4: render

 /**
  * Wraper for parent's render method so preRender method
  * can be called (that will bind the plugin proxy to the
  * engine.
  *
  * @see Zend_View_Abstract::render
  * @return string The script output.
  */
 public function render($name)
 {
     $this->preRender();
     return parent::render($name);
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:13,代码来源:View.php

示例5: render

 /**
  * Processes a view script and returns the output.
  * Hack for Zend_Layout => force the view suffix
  * depending on template engine
  *
  * @param string $name The script name to process.
  * @return string The script output.
  */
 public function render($name)
 {
     // hack for Zend_Layout which has its own view suffix handling
     $filename = $name;
     $suffix = $this->getTemplateEngine()->getViewSuffix();
     $fileParts = pathinfo($name);
     $filename = str_replace('.' . $fileParts['extension'], '.' . $suffix, $name);
     return parent::render($filename);
 }
开发者ID:niborb,项目名称:Ano_ZFTwig,代码行数:17,代码来源:View.php

示例6: output

 /**
  * Print the output
  *
  * The next method output() is a wrapper on the render() method from Zend_View_Abstract. It just sets some headers before printing the output.
  *
  * @param <type> $name
  */
 public function output($name)
 {
     header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     header("Cache-Control: no-cache");
     header("Pragma: no-cache");
     header("Cache-Control: post-check=0, pre-check=0", false);
     print parent::render($name);
 }
开发者ID:iLoiLohas,项目名称:pinchshopper,代码行数:15,代码来源:Smarty.php

示例7: render

 /**
  * Processes a view script and returns the output.
  *
  * @param string $name The script script name to process.
  * @return string The script output.
  */
 public function render($name)
 {
     // Revert to no stream
     if (!$this->getStreamFlag()) {
         return parent::render($name);
     }
     // Get stream class
     $stream = $this->getStreamWrapper();
     $streamProtocol = $this->getStreamProtocol();
     // Do extra work if something already registered our protocol
     $previousWrapperExists = false;
     // Unregister existing wrapper
     if (in_array($streamProtocol, stream_get_wrappers())) {
         stream_wrapper_unregister($streamProtocol);
         $previousWrapperExists = true;
     }
     // Load stream wrapper
     $this->_loadStreamWrapper($stream);
     // Register wrapper
     stream_wrapper_register($streamProtocol, $stream);
     // Render!
     $return = parent::render($name);
     // Unregister wrapper
     if (in_array($streamProtocol, stream_get_wrappers())) {
         stream_wrapper_unregister($streamProtocol);
     }
     // Register any old wrapper
     if ($previousWrapperExists) {
         @stream_wrapper_restore($streamProtocol);
     }
     return $return;
 }
开发者ID:BGCX262,项目名称:zym-svn-to-git,代码行数:38,代码来源:Abstract.php

示例8: render

 /**
  * When rendering, check to see if there's a master view
  * to also render.
  *
  * @return string the render result
  */
 public function render($view)
 {
     $this->setScriptPaths();
     if ($view == null) {
         echo "NO VIEW SUPPLIED<br/>";
         debug_print_backtrace();
         exit;
     }
     $viewToRender = $view;
     if ($this->viewFile != '') {
         $viewToRender = $this->viewFile;
     } else {
         $this->setViewFile($view);
     }
     // first off, render this view.
     $result = parent::render($viewToRender);
     // If there's a parent view to be rendered, render it, after setting
     // this view's content as a variable in that parent view.
     if ($this->master != null) {
         $this->master->setChildView($this);
         $this->master->childViewContent = $result;
         $result = $this->master->render('null');
     }
     return $result;
 }
开发者ID:nyeholt,项目名称:relapse,代码行数:31,代码来源:CompositeView.php


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