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


PHP RainTPL::cache_dir方法代码示例

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


在下文中一共展示了RainTPL::cache_dir方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor..
  * PDOException throwable
  */
 public function __construct($templateDirectory, $cacheDirectory, $templateExtension = 'html', $templatePrefix = '', $debug = false)
 {
     RainTPL::$tpl_dir = $templateDirectory;
     // template directory
     RainTPL::$cache_dir = $cacheDirectory;
     // cache directory
     RainTPL::$tpl_ext = $templateExtension;
     RainTPL::$path_replace = false;
     $this->rainTPL = new RainTPL();
     $this->dataDispatcher = new DataDispatcher();
     $this->tplDir = $templateDirectory;
     $this->tplExt = $templateExtension;
     $this->tplPrefix = $templatePrefix;
     $this->debug = $debug;
 }
开发者ID:AleCiri,项目名称:grCms,代码行数:19,代码来源:NavigationController.php

示例2: __construct

 public function __construct(&$site, &$main)
 {
     $this->_site = $site;
     $this->_main = $main;
     $this->_corePages = array();
     //Initializing template parser
     RainTPL::$cache_dir = 'web/views/tmp/';
     RainTPL::$tpl_ext = 'tpl';
     //We set the webadmin class into the OuterAPI class, for adding properly methods
     Leelabot::$instance->outerAPI->setWAObject($this);
     $site->addFilePage('/favicon.ico', 'web/static/images/favicon.ico');
     $site->addFilePage('/style/(.+)', 'web/static/style/$1');
     $site->addFilePage('/js/(.+)', 'web/static/js/$1');
     $site->addFilePage('/images/(.+)', 'web/static/images/$1');
     $site->addPage('/(.*)', $this, 'process');
     $site->addErrorPage(404, $this, 'error404');
     //Core pages loading
     $this->_corePages['plugins'] = new LeelabotAdminPlugins($this);
 }
开发者ID:Geolim4,项目名称:Leelabot,代码行数:19,代码来源:dispatcher.class.php

示例3: initTemplate

 /**
  * 初始化模板
  *
  * @since 1.0.1
  *
  * @param bool $empty
  *
  * @return bool
  */
 private function initTemplate($empty = false)
 {
     if ($empty) {
         return true;
     }
     if (file_exists(FILE_PREFIX . 'content/theme/' . THEME . '/')) {
         RainTPL::$tpl_dir = FILE_PREFIX . 'content/theme/' . THEME . '/';
         RainTPL::$cache_dir = FILE_PREFIX . 'content/theme/' . THEME . '_cache/';
     } else {
         RainTPL::$tpl_dir = FILE_PREFIX . 'content/theme/default/';
         RainTPL::$cache_dir = FILE_PREFIX . 'content/theme/default_cache/';
     }
     RainTPL::$tpl_ext = 'tpl.php';
     RainTPL::$path_replace = false;
     $this->tpl = new RainTPL();
 }
开发者ID:venmos,项目名称:go9999.com,代码行数:25,代码来源:template.class.php

示例4: foreach

 foreach ($feeds as $feed) {
     if (!$feed["enabled"]) {
         continue;
     }
     // Update old feeds
     if (time() - $feed["last_checked"] >= 3600) {
         $client->execute('feed.update', ["feed_id" => $feed["id"]]);
     }
 }
 // Fetch entries
 $entries = $client->execute('item.list_unread');
 // Init RainTPL
 if (file_exists("tmp/") && is_writable("tmp/")) {
     require_once 'inc/rain.tpl.class.php';
     RainTPL::$tpl_dir = "tpl/zen/";
     RainTPL::$cache_dir = "tmp/";
     RainTPL::$base_url = $BASE_URL;
     $tpl = new RainTPL();
     $tpl->assign('start_generation_time', microtime(true), RainTPL::RAINTPL_IGNORE_SANITIZE);
 }
 function get_feed_from_entry($value, $feeds)
 {
     foreach ($feeds as $feed) {
         if ($value["feed_id"] == $feed["id"]) {
             return $feed;
         }
     }
     return null;
 }
 function get_entry_link($value)
 {
开发者ID:Phyks,项目名称:miniflux_api,代码行数:31,代码来源:index.php


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