当前位置: 首页>>代码示例>>PHP>>正文


PHP Dwoo::setCacheTime方法代码示例

本文整理汇总了PHP中Dwoo::setCacheTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Dwoo::setCacheTime方法的具体用法?PHP Dwoo::setCacheTime怎么用?PHP Dwoo::setCacheTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dwoo的用法示例。


在下文中一共展示了Dwoo::setCacheTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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

 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

示例3: testTemplateGetSet

 public function testTemplateGetSet()
 {
     $dwoo = new Dwoo(DWOO_COMPILE_DIR, DWOO_CACHE_DIR);
     $dwoo->setCacheTime(10);
     $tpl = new Dwoo_Template_String('foo');
     $tpl2 = new Dwoo_Template_File('./resources/test.html');
     $this->assertEquals(false, $tpl->getResourceIdentifier());
     $this->assertEquals('string', $tpl->getResourceName());
     $this->assertEquals('file', $tpl2->getResourceName());
     $this->assertEquals(hash('md4', 'foo'), $tpl->getUid());
 }
开发者ID:apeschar,项目名称:php-fw,代码行数:11,代码来源:CoreTests.php


注:本文中的Dwoo::setCacheTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。