本文整理汇总了PHP中TemplateEngine::mustacheRender方法的典型用法代码示例。如果您正苦于以下问题:PHP TemplateEngine::mustacheRender方法的具体用法?PHP TemplateEngine::mustacheRender怎么用?PHP TemplateEngine::mustacheRender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TemplateEngine
的用法示例。
在下文中一共展示了TemplateEngine::mustacheRender方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
}
if (is_numeric($nextPage)) {
$pageIndex = intval($nextPage);
$loader = $quizzEngine;
//new QuestionsLoader();
$totalQuestions = $loader->getNumQuestions(-1);
if ($pageIndex > $loader->getNumPages()) {
$pageIndex = 0;
}
// echo $pageIndex;
// echo $loader->getNumQuestions($pageIndex);
$qsTxt = '';
for ($i = 0; $i < $loader->getNumQuestions($pageIndex); $i++) {
$qsTxt .= TemplateEngine::mustacheRenderFile(Utils::getQuestionsViewPath(), $loader->getQuestion($i, $pageIndex));
}
echo TemplateEngine::mustacheRender(Utils::getPageViewContent(), array('questions' => $qsTxt, 'pageTitle' => $loader->getPageTitle($pageIndex), 'pageIndex' => $pageIndex, 'nextPage' => $pageIndex + 1, 'numQuestions' => $loader->getNumQuestions($pageIndex), 'isLastPage' => $loader->isLastPage(intval($pageIndex)), 'pageSubtitle' => $loader->getPageSubtitle($pageIndex)));
} else {
if ($nextPage == 'thanksPage') {
$answerData = Utils::digestAnswers($_SESSION, $quizzEngine);
$htmlMessage = TemplateEngine::mustacheRenderFile('./views/finalReport.html', $answerData);
// echo $htmlMessage;
$receiveSugestions = 0;
if (isset($_SESSION['primestesugestii'])) {
$receiveSugestions = $_SESSION['primestesugestii'] == 'on' ? 1 : 0;
}
$id = DBUtils::executeQuery($insertReportStatement, $_SESSION['nume'], $_SESSION['industrie'], $_SESSION['email'], $receiveSugestions, $_SESSION['telefon'], $_SESSION['completedAnswers'], $_SESSION['website'], $htmlMessage);
require 'app/core/libs/PHPMailer/PHPMailerAutoload.php';
// echo $htmlMessage;
$mail = new PHPMailer();
$mail->isSMTP();
$mail->setFrom('admin@todaysquizz.ro', 'Admin');
示例2: mustacheRenderFile
public static function mustacheRenderFile($file, $values)
{
$content = file_get_contents($file);
return TemplateEngine::mustacheRender($content, $values);
}