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


PHP Application::render方法代码示例

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


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

示例1: index

 /**
  * @param \Application $app
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(\Application $app)
 {
     return $app->render('admin.twig');
 }
开发者ID:mrcoco,项目名称:silex-skeleton-project,代码行数:8,代码来源:IndexController.php

示例2: render

 /**
  * Renders response from controller action
  *
  * @param string $controllerInstance Controller
  * @param Response $response Response to render
  * @return string Renderer content
  * @throws ViewNotFoundException if view does not exists for specified controller
  */
 protected function render(Controller $controllerInstance, Response $response, $actionName = null)
 {
     $this->logStat('Before page rendering');
     $output = parent::render($controllerInstance, $response, $actionName);
     if ($cache = $controllerInstance->getCacheHandler()) {
         $cache->setData($output);
         $cache->save();
     }
     $this->logStat('Finished page rendering');
     return $output;
 }
开发者ID:GregerA,项目名称:livecart,代码行数:19,代码来源:LiveCart.php

示例3: Application

<?php

define('DACCESS', 1);
require 'framework.php';
$app = new Application();
$app->route();
$app->dispatch();
$app->render();
开发者ID:walney,项目名称:SlaveFramework,代码行数:8,代码来源:index.php

示例4: name

 /**
  * @param \Application $app
  * @param string $name
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function name(\Application $app, $name)
 {
     return $app->render('index.twig', array('name' => $name));
 }
开发者ID:mrcoco,项目名称:silex-skeleton-project,代码行数:9,代码来源:IndexController.php

示例5: str_replace

                }
                $item = str_replace("_", " ", $item);
                $item = ucwords($item);
                $top_menu .= "<a href='" . Application::getLink($link) . "'><span>{$item}</span></a>";
            }
            Application::$templateEngine->assign('top_menu', $top_menu);
        }
    }
}
// Log the route into the audit trail if it is enabled
if ($_SESSION['logged_in'] == true && $_GET['q'] != 'system/api/table' && ENABLE_AUDIT_TRAILS === true) {
    $data = json_encode(array('route' => $_GET['q'], 'request' => $_REQUEST, 'get' => $_GET, 'post' => $_POST));
    if (class_exists("SystemAuditTrailModel", false) && ENABLE_ROUTING_TRAILS === true) {
        SystemAuditTrailModel::log(array('item_id' => '0', 'item_type' => 'routing_activity', 'description' => "Accessed [{$_GET['q']}]", 'type' => SystemAuditTrailModel::AUDIT_TYPE_ROUTING, 'data' => $data));
    }
}
// Load the styleseets and the javascripts
if ($GLOBALS['fapi_stylesheet'] === false) {
    Application::preAddStylesheet("css/fapi.css", Application::getWyfHome("fapi/"));
} else {
    Application::preAddStylesheet($GLOBALS['fapi_stylesheet']);
}
Application::preAddStylesheet("kalendae/kalendae.css", Application::getWyfHome('assets/js/'));
Application::preAddStylesheet("css/main.css");
Application::addStylesheet('css/rapi.css', Application::getWyfHome('rapi/'));
Application::addJavaScript(Application::getLink(Application::getWyfHome("fapi/js/fapi.js")));
Application::addJavaScript(Application::getLink(Application::getWyfHome("assets/js/jquery.js")));
Application::addJavaScript(Application::getLink(Application::getWyfHome("assets/js/kalendae/kalendae.js")));
// Blast the HTML code to the browser!
Application::render();
开发者ID:ekowabaka,项目名称:wyf,代码行数:30,代码来源:entry.php

示例6: layoutAction

 function layoutAction(Request $request, \Application $app)
 {
     return $app->render('Application/Layout/layout.twig');
 }
开发者ID:ilanfreoua,项目名称:pluginbaby,代码行数:4,代码来源:PlugController.php


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