當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TemplateEngine::display方法代碼示例

本文整理匯總了PHP中TemplateEngine::display方法的典型用法代碼示例。如果您正苦於以下問題:PHP TemplateEngine::display方法的具體用法?PHP TemplateEngine::display怎麽用?PHP TemplateEngine::display使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TemplateEngine的用法示例。


在下文中一共展示了TemplateEngine::display方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render

 function render()
 {
     $template = new TemplateEngine($this->filepath);
     $template->set($this->templateData);
     $template->setGlobals($this->templateGlobals);
     $template->display();
     if (isset($_GET['DEBUG'])) {
         echo '<pre>';
         var_dump($this->templateData);
         echo '</pre>';
     }
 }
開發者ID:BikeMaker,項目名稱:Code,代碼行數:12,代碼來源:WebModule.php

示例2: display

 /** Display output of TSunic
  *
  * Call this function to display the output of TSunic.
  * If you call this function from an ajax request, it will return xml output
  *
  * @param string $template
  *	Request output of certain template only
  *
  * @return bool
  */
 public function display($template = false)
 {
     // validate template
     if (empty($template)) {
         $template = $this->Input->get('tmpl');
         // is tmpl?
         if (empty($template)) {
             $template = '$$$html';
         }
     }
     // display templates
     if (!$this->isAjax()) {
         $this->Tmpl->display($template);
     } else {
         $this->Tmpl->responseAjax();
     }
     return true;
 }
開發者ID:nfrickler,項目名稱:tsunic,代碼行數:28,代碼來源:TSunic.class.php

示例3: redirectURI

} else {
    $isAdmin = 0;
    if ($user != null && $user->checkPermissions(0, 0, 0, 1, 1)) {
        // wenn ORDERER
        redirectURI("/orderer/index.php");
    }
    if ($user != null && $user->checkPermissions(0, 0, 1)) {
        // wenn USER
        redirectURI("/user/index.php");
    }
}
$LOG = new Log();
$tpl = new TemplateEngine("template/viewProduct.html", "template/frame.html", $lang["viewer_viewProduct"]);
$LOG->write('3', 'viewer/viewProduct.php');
$pID = $_GET['pID'];
$tpl->assign('ID', $pID);
//Produktdaten
$product_query = DB_query("SELECT\n\t\t\t\t*\n\t\t\t\tFROM products\n\t\t\t\tWHERE products_id = " . $pID . "\n\t\t\t\tAND deleted = 0\n\t\t\t\tORDER BY sort_order, name\n\t\t\t\t");
$product = DB_fetchArray($product_query);
$tpl->assign('name', $product['name']);
$tpl->assign('description', $product['description']);
//$tpl->assign('sort_order',$product['sort_order']);
$tpl->assign('active', $product['active']);
// zur Unterscheidung, ob anzeigbar, weiterhin mitliefern
$tpl->assign('image_small', $product['image_small']);
$tpl->assign('image_big', $product['image_big']);
$tpl->assign('stock', $product['stock']);
$tpl->assign('price', $product['price']);
$tpl->assign('is_admin', $isAdmin);
$tpl->display();
開發者ID:BackupTheBerlios,項目名稱:wpp-svn,代碼行數:30,代碼來源:viewProduct.php

示例4: display

 /**
  * Helper function: Avoids having to call $theme->template_engine->display( 'template_name' );
  * @param string $template_name The name of the template to display
  */
 public function display($template_name)
 {
     $this->play_var_stack();
     $this->template_engine->assign('theme', $this);
     $this->template_engine->display($template_name);
 }
開發者ID:habari,項目名稱:system,代碼行數:10,代碼來源:theme.php

示例5: display

 /**
  * 顯示模版
  *
  * @param null $templateFile
  */
 protected function display($templateFile = null)
 {
     $path = $this->setTemplatePath($templateFile);
     file_exists($path) or Halt($path . '模版文件不存在');
     $this->assign('__PUBLIC__', __PUBLIC__ . '/');
     $this->assign('__UPLOAD__', __UPLOAD__ . '/');
     if (C('TEMPLATE_ENGINE_START')) {
         parent::display($path);
     } else {
         extract($this->vars);
         include $path;
     }
 }
開發者ID:qxy735,項目名稱:YuYi-General,代碼行數:18,代碼來源:BaseController.php


注:本文中的TemplateEngine::display方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。