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


PHP MVCUtils::findTemplate方法代碼示例

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


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

示例1: __construct

 /**
  * Construct the object
  * 
  * @param Exception The exception to be made user friendly
  */
 public function __construct($exception)
 {
     global $cfg;
     $this->template = new Smarty();
     $this->template->compile_dir = $cfg['smarty']['compiledir'];
     $this->exception = $exception;
     $this->templateFileName = MVCUtils::findTemplate($cfg['smarty']['RenderedexceptionTemplateFile']);
     $this->_setupTemplate();
 }
開發者ID:radiowarwick,項目名稱:digiplay_legacy,代碼行數:14,代碼來源:RenderedExceptionViewer.class.php

示例2: smarty_resource_rfile_timestamp

 public static function smarty_resource_rfile_timestamp($templateName, &$timestamp, &$smarty)
 {
     global $cfg;
     $file = MVCUtils::findTemplate($templateName);
     if ($file === false) {
         return false;
     } else {
         return true;
     }
 }
開發者ID:radiowarwick,項目名稱:digiplay_legacy,代碼行數:10,代碼來源:SmartyResources.class.php

示例3: isValid

 public function isValid(&$data)
 {
     global $cfg;
     $db = Database::getInstance($cfg['MVC']['dsn']);
     $data = $db->quoteSmart($data);
     $exists = $db->getOne("SELECT COUNT(*) FROM templates WHERE filename = {$data}");
     if ($exists > 0) {
         return 'The specified template is already in use';
     } elseif (MVCUtils::findTemplate($data) === false) {
         return 'The specified template does not exist';
     } else {
         return true;
     }
 }
開發者ID:radiowarwick,項目名稱:digiplay_legacy,代碼行數:14,代碼來源:ValidUnusedTplFile.class.php

示例4: __construct

 public function __construct($templateS, $formName = '', $viewerModuleName, $fieldData = array(), $invalidFields = array())
 {
     global $cfg;
     $this->template = new Smarty();
     $this->viewerModuleName = $viewerModuleName;
     if (isset($cfg['smarty']['debug']) && $cfg['smarty']['debug'] == true) {
         $this->template->clear_all_cache();
         $this->template->caching = false;
         $this->template->force_compile = true;
     }
     $this->template->compile_dir = $cfg['smarty']['compiledir'];
     //$this->template->template_dir = $cfg['smarty']['tplRoot'];
     $this->templateIDStack = $templateS;
     $this->formName = $formName;
     $this->fieldData = $fieldData;
     $this->invalidFields = $invalidFields;
     $this->templateFileName = MVCUtils::findTemplate(end($this->templateIDStack));
     //echo "#" . $this->templateFileName . "#<br>";
     if ($this->templateFileName === false) {
         throw new LoggedException("The template with ID " . end($this->templateIDStack) . " could not be found", 0, self::module, 'error');
     }
     $this->setupTemplate();
 }
開發者ID:radiowarwick,項目名稱:digiplay_legacy,代碼行數:23,代碼來源:Viewer.class.php


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