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


PHP Dwoo::setCompileDir方法代碼示例

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


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

示例1: spawn

 function spawn()
 {
     // Main Dwoo object
     $dwoo = new Dwoo();
     // The directory where compiled templates are located
     $dwoo->setCompileDir($this->_parser_compile_dir);
     $dwoo->setCacheDir($this->_parser_cache_dir);
     $dwoo->setCacheTime($this->_parser_cache_time);
     // Security
     $security = new MY_Security_Policy();
     $security->setPhpHandling($this->_parser_allow_php_tags);
     $security->allowPhpFunction($this->_parser_allowed_php_functions);
     $dwoo->setSecurityPolicy($security);
     return $dwoo;
 }
開發者ID:ArekSredzki,項目名稱:Kuklos,代碼行數:15,代碼來源:MY_Parser.php

示例2: spawn

 /**
  * Spawns a new instance of Dwoo.
  *
  * @return object
  **/
 protected function spawn()
 {
     if (is_writable($this->compile_dir)) {
         // Main Dwoo object
         $dwoo = new Dwoo();
         // Set the directory of where to compile the files
         $dwoo->setCompileDir($this->compile_dir);
         // set security policy
         $security = new MY_Security_Policy();
         // no PHP handline
         $security->setPhpHandling(1);
         $security->allowPhpFunction($this->allowed_functions);
         $dwoo->setSecurityPolicy($security);
         return $dwoo;
     }
 }
開發者ID:huayuxian,項目名稱:FUEL-CMS,代碼行數:21,代碼來源:Fuel_dwoo_parser.php

示例3: spawn

 function spawn()
 {
     // try to create directory if it doesn't exist'
     // added by David McReynolds @ Daylight Studio 9/16/10 to prevent problems of axing the entire directory
     if (!is_dir($this->_parser_compile_dir)) {
         @mkdir($this->_parser_compile_dir, 0777, TRUE);
         chmodr($this->_parser_compile_dir, 0777);
     }
     if (is_writable($this->_parser_compile_dir)) {
         // Main Dwoo object
         $dwoo = new Dwoo();
         // The directory where compiled templates are located
         $dwoo->setCompileDir($this->_parser_compile_dir);
         $dwoo->setCacheDir($this->_parser_cache_dir);
         $dwoo->setCacheTime($this->_parser_cache_time);
         // Security
         $security = new MY_Security_Policy();
         $security->setPhpHandling($this->_parser_allow_php_tags);
         $security->allowPhpFunction($this->_parser_allowed_php_functions);
         $dwoo->setSecurityPolicy($security);
         return $dwoo;
     }
 }
開發者ID:randombrad,項目名稱:FUEL-CMS,代碼行數:23,代碼來源:MY_Parser.php

示例4: renderTemplate

 /**
  * Renders a Dwoo template.
  *
  * @param $templateFilename string The name of a template file.
  * @param $data array Data to pass to the template.
  *
  * @see http://dwoo.org/
  */
 public function renderTemplate($templateFilename, $data)
 {
     $dwoo = new Dwoo();
     $tpl = new Dwoo_Template_File($templateFilename);
     $compiler = new Dwoo_Compiler();
     if (!file_exists(INSTRUCTIONCONTROL__CONFIG_DWOO_COMPILEDIR)) {
         mkdir(INSTRUCTIONCONTROL__CONFIG_DWOO_COMPILEDIR);
     }
     $dwoo->setCompileDir(INSTRUCTIONCONTROL__CONFIG_DWOO_COMPILEDIR);
     $dwoo->output($tpl, $data);
 }
開發者ID:BackupTheBerlios,項目名稱:instructcontrol,代碼行數:19,代碼來源:InstructionControl_Utils.class.php


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