本文整理匯總了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');
}