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


PHP TemplateEngine::getInstance方法代碼示例

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


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

示例1: beforeRender

 public function beforeRender()
 {
     $menuSource = "";
     foreach ($this->menuEntries as $name => $link) {
         $menuSource .= '<li><a href="' . $link . '">' . $name . '</a></li>';
     }
     TemplateEngine::getInstance()->replaceMarks("menu", $menuSource);
 }
開發者ID:hendrikstill,項目名稱:manusing,代碼行數:8,代碼來源:Menu.php

示例2: __construct

 private function __construct()
 {
     $this->classloader = Classloader::getInstance();
     $this->classloader->initLoadLib();
     $this->dataConnector = DataConnector::getInstance();
     $this->routingEngine = RoutingEngine::getInstance();
     $this->templateEngine = TemplateEngine::getInstance();
 }
開發者ID:hendrikstill,項目名稱:manusing,代碼行數:8,代碼來源:Manusing.php

示例3: capitalize

 public static function capitalize($str, $lc_rest = true)
 {
     TemplateEngine::getInstance()->loadPlugin('smarty_modifier_capitalize');
     return smarty_modifier_capitalize($str, false, $lc_rest);
 }
開發者ID:logbon72,項目名稱:pebble-movies-server,代碼行數:5,代碼來源:Utilities.php

示例4: renderAsHTML

 /**
  * Normal render 
  * @param string $view
  */
 public function renderAsHTML($view = 'index')
 {
     $routingEngine = RoutingEngine::getInstance();
     $templateEngine = TemplateEngine::getInstance();
     $templateEngine->loadDesign();
     $templateEngine->loadView($routingEngine->controller, $routingEngine->action);
     $templateEngine->setTitle($routingEngine->controller . ' > ' . $routingEngine->action);
     $templateEngine->render($this);
 }
開發者ID:hendrikstill,項目名稱:manusingAnt,代碼行數:13,代碼來源:Controller.php

示例5: setTitle

 /**
  * Defines the Title tag
  * @param string $title
  */
 public function setTitle($title)
 {
     $templateEngine = TemplateEngine::getInstance();
     $templateEngine->setTitle($title);
     Log::getInstance()->event("Titel: " . $title, Log::INFO);
 }
開發者ID:hendrikstill,項目名稱:manusing,代碼行數:10,代碼來源:Controller.php

示例6: init

 public function init()
 {
     Log::getInstance()->event("Loaded my Plugin", Log::INFO);
     TemplateEngine::getInstance()->replaceMarks("info", "Test");
 }
開發者ID:hendrikstill,項目名稱:manusing,代碼行數:5,代碼來源:Example.php


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