本文整理汇总了PHP中TemplateEngine::output方法的典型用法代码示例。如果您正苦于以下问题:PHP TemplateEngine::output方法的具体用法?PHP TemplateEngine::output怎么用?PHP TemplateEngine::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TemplateEngine
的用法示例。
在下文中一共展示了TemplateEngine::output方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
if (isset($_POST['assign']) && (int) $_POST['assign'] >= 0) {
$assign = (int) $_POST['assign'];
} else {
$assign = 1;
}
if (isset($_POST['status']) && (int) $_POST['status'] == 'closed') {
$status = 'closed';
} else {
$status = 'open';
}
if (isset($_POST['due'])) {
$due = $_POST['due'];
} else {
$due = date("Y-m-d");
}
$added = date("Y-m-d");
if (DBIssues::editIssue($id, $type, $name, $details, $target, $assign, $due, $added, $added, $status, $author)) {
Session::addMessage('Issue Edited Successfully');
header("Location: " . $cfg['domain'] . $cfg['site_path'] . 'issues_detail.php?id=' . $id);
} else {
Session::addMessage("An Error Occurred");
header("Location: " . $cfg['domain'] . $cfg['site_path'] . 'issues_add.php');
}
exit;
} else {
header('Location: ' . $cfg['domain'] . $cfg['site_path'] . 'issues.php');
exit;
}
}
TemplateEngine::output($tpl, new IssuesEditData($id));
示例2: IssuesListData
<?php
/*------------------------------------------------------------------------------
File: www/issues.php
Project: cs2760 - Assignment #8
Version: 0.1.0
By: Lauren Stratton, Simon McIlhargey, Tim Oram
------------------------------------------------------------------------------*/
require 'init.php';
$tpl = TemplateEngine::templateFromFile('content/issues');
$data = new IssuesListData();
TemplateEngine::output($tpl, $data);
示例3:
<?php
/*------------------------------------------------------------------------------
File: www/index.php
Project: cs2760 - Assignment #8
Version: 0.1.0
By: Lauren Stratton, Simon McIlhargey, Tim Oram
------------------------------------------------------------------------------*/
require 'init.php';
$tpl = TemplateEngine::templateFromFile('content/projects');
TemplateEngine::output($tpl);
示例4: date
} else {
$target = 1;
}
if (isset($_POST['assign']) && (int) $_POST['assign'] >= 0) {
$assign = (int) $_POST['assign'];
} else {
$assign = 1;
}
if (isset($_POST['status']) && (int) $_POST['status'] == 'closed') {
$status = 'closed';
} else {
$status = 'open';
}
if (isset($_POST['due'])) {
$due = $_POST['due'];
} else {
$due = date("Y-m-d");
}
$added = date("Y-m-d");
if (DBIssues::addIssue($type, $name, $details, $target, $assign, $due, $added, $added, $status, $author)) {
Session::addMessage('Issue Added Successfully');
header("Location: " . $cfg['domain'] . $cfg['site_path'] . 'issues_detail.php?id=' . DB::lastInsertedId());
} else {
Session::addMessage("An Error Occurred");
header("Location: " . $cfg['domain'] . $cfg['site_path'] . 'issues_add.php');
}
exit;
}
$tpl = TemplateEngine::templateFromFile('content/issues_add');
TemplateEngine::output($tpl, new IssuesData());