本文整理汇总了PHP中base_controller::_render方法的典型用法代码示例。如果您正苦于以下问题:PHP base_controller::_render方法的具体用法?PHP base_controller::_render怎么用?PHP base_controller::_render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base_controller
的用法示例。
在下文中一共展示了base_controller::_render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _render
public function _render($e = NULL)
{
if ($e instanceof HTTPException) {
$this->view->assign('exception', $e);
$errstr = get_class($e);
$templatefile = $errstr . ".tpl";
$errstr = preg_replace('/^HTTP/', '', $errstr);
$errstr = trim(preg_replace('/([A-Z])/', ' $1', $errstr));
$afn = array(array($this->view->template_dir . '/errorpage', $templatefile), array($this->view->template_dir . '/errorpage', 'default.tpl'), array("./vanilla/extensions/errorpage/views", $templatefile), array("./vanilla/extensions/errorpage/views", 'default.tpl'));
foreach ($afn as $a) {
list($tdir, $tf) = $a;
if (file_exists("{$tdir}/{$tf}")) {
$this->view->template_dir = $tdir;
$this->viewname = $tf;
break;
}
}
} else {
$errstr = '';
$this->view->template_dir = "./vanilla/extensions/errorpage/views";
$this->viewname = "exception.tpl";
}
$this->view->assign('errorstr', $errstr);
return parent::_render();
}
示例2: _render
public function _render()
{
$this->view->template_dir = "./vanilla/extensions/datainspector/views";
$this->view->register_modifier('objlink', array('controller__datainspector', 'smarty_modifier_objlink'));
$this->view->register_modifier('notefieldname', array('controller__datainspector', 'smarty_modifier_notefieldname'));
$this->view->register_modifier('noteobjlink', array('controller__datainspector', 'smarty_modifier_noteobjlink'));
$this->view->register_modifier('getimageobj', array('controller__datainspector', 'smarty_modifier_getimageobj'));
return parent::_render();
}
示例3: _render
public function _render()
{
if ($this->tplprocess) {
$this->view->left_delimiter = '{{';
$this->view->right_delimiter = '}}';
parent::_render();
} else {
header("Content-type: " . $this->content_type);
readfile($this->view->template_dir . '/' . $this->viewname);
}
exit;
}