本文整理汇总了PHP中Dwoo::output方法的典型用法代码示例。如果您正苦于以下问题:PHP Dwoo::output方法的具体用法?PHP Dwoo::output怎么用?PHP Dwoo::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dwoo
的用法示例。
在下文中一共展示了Dwoo::output方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getData
public function getData()
{
$this->check_permission();
//get global_lib Singelton
$mainlib = global_lib::getInstance();
//Create path of Controller Files => controller/FILENAME.php
$path = $mainlib->joinPaths("controller/", $this->meta_data["main_file"] . ".php");
try {
//Include Controller File
include_once $path;
} catch (Exception $e) {
//Exception
var_dump($e);
}
try {
//Call Class from Controller File
$web_call = new $this->meta_data["main_class"]($this->request);
//Request Type (Method) to Lowercase
$method_call = strtolower($this->request->method);
//Rufe die methode im Class File auf
$web_call->{$method_call}();
// Generiere Variablen für die Template Engine
$template_engine_var = $web_call->get_context();
// Generiere für das Template den Pfad
$template_path = $mainlib->joinPaths("view/", $web_call->template . ".html");
// Lade Dwoo Template Engine
$dwoo = new Dwoo();
// Compare get_context and template
$dwoo->output($template_path, $template_engine_var);
} catch (Exception $e) {
var_dump($e);
}
}
示例2: rawurlencode
get_load_pie($showhosts, $hosts_up, $hosts_down, $user, $conf, $metrics, $cluster, $name, $data);
}
if ($showhosts != 0) {
get_host_metric_graphs($showhosts, $hosts_up, $hosts_down, $user, $conf, $metrics, $user['metricname'], $sort, $clustername, $get_metric_string, $cluster, $always_timestamp, $reports[$user['metricname']], $clustergraphsize, $range, $start, $end, $cs, $ce, $vlabel, $data);
}
///////////////////////////////////////////////////////////////////////////////
// Creates a heatmap
///////////////////////////////////////////////////////////////////////////////
if (isset($conf['heatmaps_enabled']) and $conf['heatmaps_enabled'] == 1 and count($hosts_up) > 0) {
get_load_heatmap($hosts_up, $user['host_regex'], $metrics, $data, $sort);
}
$data->assign("conf", $conf);
$data->assign("showhosts", $showhosts);
// No reason to go on if we are not displaying individual hosts
if (!is_array($hosts_up) or !$showhosts) {
$dwoo->output($tpl, $data);
return;
}
///////////////////////////////////////////////////////////////////////////////
// Show stacked graphs
///////////////////////////////////////////////////////////////////////////////
if (isset($conf['show_stacked_graphs']) and $conf['show_stacked_graphs'] == 1 and !preg_match("/_report\$/", $user['metricname'])) {
$cluster_url = rawurlencode($clustername);
$stacked_args = "m={$user['metricname']}&c={$cluster_url}&r={$range}&st={$cluster['LOCALTIME']}";
if (isset($user['host_regex'])) {
$stacked_args .= "&host_regex=" . $user['host_regex'];
}
$data->assign("stacked_graph_args", $stacked_args);
}
if ($conf['picker_autocomplete'] == true) {
$data->assign('picker_autocomplete', true);
示例3: renderTemplate
/**
* Renders a Dwoo template.
*
* @param $templateFilename string The name of a template file.
* @param $data array Data to pass to the template.
*
* @see http://dwoo.org/
*/
public function renderTemplate($templateFilename, $data)
{
$dwoo = new Dwoo();
$tpl = new Dwoo_Template_File($templateFilename);
$compiler = new Dwoo_Compiler();
if (!file_exists(INSTRUCTIONCONTROL__CONFIG_DWOO_COMPILEDIR)) {
mkdir(INSTRUCTIONCONTROL__CONFIG_DWOO_COMPILEDIR);
}
$dwoo->setCompileDir(INSTRUCTIONCONTROL__CONFIG_DWOO_COMPILEDIR);
$dwoo->output($tpl, $data);
}