本文整理汇总了PHP中waSystem::getAppCachePath方法的典型用法代码示例。如果您正苦于以下问题:PHP waSystem::getAppCachePath方法的具体用法?PHP waSystem::getAppCachePath怎么用?PHP waSystem::getAppCachePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waSystem
的用法示例。
在下文中一共展示了waSystem::getAppCachePath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param waSystem $system
* @param array $options
* @return waSmarty3View
*/
public function __construct(waSystem $system, $options = array())
{
parent::__construct($system, $options);
$this->smarty = new Smarty();
$this->setOptions($options);
if (isset($options['auto_literal'])) {
$this->smarty->auto_literal = $options['auto_literal'];
}
if (isset($options['left_delimiter'])) {
$this->smarty->left_delimiter = $options['left_delimiter'];
}
if (isset($options['right_delimiter'])) {
$this->smarty->right_delimiter = $options['right_delimiter'];
}
$this->smarty->setTemplateDir(isset($options['template_dir']) ? $options['template_dir'] : $this->system->getAppPath());
$this->smarty->setCompileDir(isset($options['compile_dir']) ? $options['compile_dir'] : $this->system->getAppCachePath('templates/compiled/'));
$this->smarty->setCacheDir($this->system->getAppCachePath('templates/cache/'));
if (ini_get('safe_mode')) {
$this->smarty->use_sub_dirs = false;
} else {
$this->smarty->use_sub_dirs = true;
}
// not use
//$this->smarty->setCompileCheck(wa()->getConfig()->isDebug()?true:false);
$this->smarty->addPluginsDir($this->system->getConfig()->getPath('system') . '/vendors/smarty-plugins');
$this->smarty->loadFilter('pre', 'translate');
}