本文整理汇总了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');
}
示例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;
}
示例3: Application
<?php
define('DACCESS', 1);
require 'framework.php';
$app = new Application();
$app->route();
$app->dispatch();
$app->render();
示例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));
}
示例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();
示例6: layoutAction
function layoutAction(Request $request, \Application $app)
{
return $app->render('Application/Layout/layout.twig');
}