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


PHP Zend_View_Interface::render方法代码示例

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


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

示例1: checkSkinStyles

 /**
  *
  */
 public function checkSkinStyles($name, $values)
 {
     $config = Zend_Registry::get('config');
     $basePath = $config->design->pathToSkins;
     $xhtml = array();
     $this->view->name = $name;
     $this->view->selectedStyles = $values;
     //load the skin folders
     if (is_dir('./' . $basePath)) {
         $folders = Digitalus_Filesystem_Dir::getDirectories('./' . $basePath);
         if (count($folders) > 0) {
             foreach ($folders as $folder) {
                 $this->view->skin = $folder;
                 $styles = Digitalus_Filesystem_File::getFilesByType('./' . $basePath . '/' . $folder . '/styles', 'css');
                 if (is_array($styles)) {
                     foreach ($styles as $style) {
                         //add each style sheet to the hash
                         // key = path / value = filename
                         $hashStyles[$style] = $style;
                     }
                     $this->view->styles = $hashStyles;
                     $xhtml[] = $this->view->render($this->partialFile);
                     unset($hashStyles);
                 }
             }
         }
     } else {
         throw new Zend_Acl_Exception('Unable to locate skin folder');
     }
     return implode(null, $xhtml);
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:34,代码来源:CheckSkinStyles.php

示例2: indexAction

 public function indexAction()
 {
     // STAGE 3: Choose, create, and optionally update models using business logic.
     $cities = parse_ini_file('cities.ini');
     // $cities contains our simple data model
     // STAGE 4: Apply business logic to create a presentation model for the view.
     ksort($_SERVER);
     $this->_view->SERVER = $_SERVER;
     $this->_view->date = date('Y-m-d H:i:s');
     $this->_view->cities = array();
     $this->_view->distances = array();
     if (isset($_REQUEST['distance'])) {
         $maxDistance = intval($_REQUEST['distance']);
     } else {
         $this->_redirect('/?distance=10000');
     }
     $this->_view->maxDistance = $maxDistance;
     foreach ($cities as $city => $distance) {
         // business logic specifies to filter the data model satisfying distance criteria
         if ($distance < $maxDistance) {
             $this->_view->cities[] = $city;
             $this->_view->distances[] = $distance;
             #echo "Distance from London, UK to $city is $distance km.<br>\n";
         }
     }
     // STAGE 5: Choose view and submit presentation model to view.
     $this->_response->appendBody($this->_view->render('indexIndex.phtml'));
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:28,代码来源:IndexController.php

示例3: menu

 /**
  * @return string
  */
 public function menu()
 {
     $model = new Site_Model_Menu();
     $items = $model->fetchAll(null, 'orderid');
     $activeItem = $model->fetchRow(array('"' . addcslashes($this->view->url(), "'") . '" LIKE CONCAT("%",url,"%")'), 'LENGTH(url) desc');
     $this->view->items = $items;
     if ($activeItem) {
         $this->view->activeId = $activeItem->id;
     }
     return $this->view->render('menu.phtml');
 }
开发者ID:Konstnantin,项目名称:zf-app,代码行数:14,代码来源:Menu.php

示例4: renderTemplate

 private function renderTemplate($templateName)
 {
     if (!strpos($templateName, '.phtml')) {
         $templateName .= '.phtml';
     }
     return $this->view->render($templateName);
 }
开发者ID:dafik,项目名称:dfi,代码行数:7,代码来源:ContentDecorator.php

示例5: renderScript

 /**
  * Render a view script (optionally to a named response segment)
  *
  * Sets the noRender flag to true when called.
  *
  * @param  string $script
  * @param  string $name
  * @return void
  */
 public function renderScript($script, $name = null)
 {
     if (null === $name) {
         $name = $this->getResponseSegment();
     }
     $this->getResponse()->appendBody($this->view->render($script), $name);
     $this->setNoRender();
 }
开发者ID:bcsgarcia,项目名称:LojaTeste,代码行数:17,代码来源:ViewRenderer.php

示例6: renderScript

    /**
     * Render a view script (optionally to a named response segment)
     *
     * Sets the noRender flag to true when called.
     *
     * @param  string $script
     * @param  string $name
     * @return void
     */
    public function renderScript($script, $name = null)
    {
        if (null === $name) {
            $name = $this->getResponseSegment();
        }

require_once 'Zend/Log.php';
require_once 'Zend/Log/Writer/Stream.php';
$log = new Zend_Log(new Zend_Log_Writer_Stream('/tmp/zf.log'));
$log->info(sprintf('Preparing to render script "%s"', $script));

        $this->getResponse()->appendBody(
            $this->view->render($script),
            $name
        );

        $this->setNoRender();
    }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:27,代码来源:ViewRenderer.php

示例7: renderBody

 private function renderBody($script)
 {
     return $this->_view->render($script);
 }
开发者ID:shevron,项目名称:zend-simplecal,代码行数:4,代码来源:JqEmail.php

示例8: render

 /**
  * Renders the module content with the module template.
  *
  * @return string
  */
 public function render($template, $vars = array(), $spec = null)
 {
     $template = $template . $this->_templateSuffix;
     if (null === $spec) {
         $this->view->assign($vars);
     } else {
         $this->view->assign($spec, $vars);
     }
     return $this->view->render($template);
 }
开发者ID:dmj,项目名称:uni-helmstedt.hab.de,代码行数:15,代码来源:Module.php


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