本文整理汇总了PHP中RainTPL::tpl_ext方法的典型用法代码示例。如果您正苦于以下问题:PHP RainTPL::tpl_ext方法的具体用法?PHP RainTPL::tpl_ext怎么用?PHP RainTPL::tpl_ext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RainTPL
的用法示例。
在下文中一共展示了RainTPL::tpl_ext方法的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;
}
示例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);
}
示例3: exit
<?php
/* Copyright (c) 2014 Freeder
* Released under a MIT License.
* See the file LICENSE at the root of this repo for copying permission.
*/
$force_public = true;
// Allow JS loading while not logged in
require_once 'inc/init.php';
require_once 'inc/js.tpl.class.php';
if (!isset($_GET['script'])) {
exit('error');
}
$script = $_GET['script'];
RainTPL::$tpl_ext = 'js';
RainTPL::$path_replace = false;
$tpl = new JsTPL();
$tpl->assign('base_url', RainTPL::$base_url);
$tpl->draw($script);
示例4: 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();
}