本文整理汇总了PHP中Piwik_View::addPiwikPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_View::addPiwikPath方法的具体用法?PHP Piwik_View::addPiwikPath怎么用?PHP Piwik_View::addPiwikPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik_View
的用法示例。
在下文中一共展示了Piwik_View::addPiwikPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($templateFile, $smConf = array(), $filter = true)
{
$this->template = $templateFile;
$this->smarty = new Piwik_Smarty();
if (count($smConf) == 0) {
$smConf = Zend_Registry::get('config')->smarty;
}
foreach ($smConf as $key => $value) {
$this->smarty->{$key} = $value;
}
$this->smarty->template_dir = $smConf->template_dir->toArray();
array_walk($this->smarty->template_dir, array("Piwik_View", "addPiwikPath"), PIWIK_INCLUDE_PATH);
$this->smarty->plugins_dir = $smConf->plugins_dir->toArray();
array_walk($this->smarty->plugins_dir, array("Piwik_View", "addPiwikPath"), PIWIK_INCLUDE_PATH);
$this->smarty->compile_dir = $smConf->compile_dir;
Piwik_View::addPiwikPath($this->smarty->compile_dir, null, PIWIK_USER_PATH);
$this->smarty->cache_dir = $smConf->cache_dir;
Piwik_View::addPiwikPath($this->smarty->cache_dir, null, PIWIK_USER_PATH);
$error_reporting = $smConf->error_reporting;
if ($error_reporting != (string) (int) $error_reporting) {
$error_reporting = self::bitwise_eval($error_reporting);
}
$this->smarty->error_reporting = $error_reporting;
$this->smarty->assign('tag', 'piwik=' . Piwik_Version::VERSION);
if ($filter) {
$this->smarty->load_filter('output', 'cachebuster');
$this->smarty->load_filter('output', 'ajaxcdn');
$this->smarty->load_filter('output', 'trimwhitespace');
}
// global value accessible to all templates: the piwik base URL for the current request
$this->piwikUrl = Piwik_Url::getCurrentUrlWithoutFileName();
}
示例2: __construct
public function __construct($templateFile, $smConf = array())
{
require_once "Smarty.php";
$this->template = $templateFile;
$this->smarty = new Piwik_Smarty();
if (count($smConf) == 0) {
$smConf = Zend_Registry::get('config')->smarty;
}
foreach ($smConf as $key => $value) {
$this->smarty->{$key} = $value;
}
$this->smarty->template_dir = $smConf->template_dir->toArray();
array_walk($this->smarty->template_dir, array("Piwik_View", "addPiwikPath"));
$this->smarty->plugins_dir = $smConf->plugins_dir->toArray();
array_walk($this->smarty->plugins_dir, array("Piwik_View", "addPiwikPath"));
$this->smarty->compile_dir = $smConf->compile_dir;
Piwik_View::addPiwikPath($this->smarty->compile_dir, null);
$this->smarty->cache_dir = $smConf->cache_dir;
Piwik_View::addPiwikPath($this->smarty->cache_dir, null);
$this->smarty->error_reporting = $smConf->debugging;
$this->smarty->error_reporting = $smConf->error_reporting;
$this->smarty->assign('tag', 'piwik=' . Piwik_Version::VERSION);
$this->smarty->load_filter('output', 'cachebuster');
$this->smarty->load_filter('output', 'trimwhitespace');
// global value accessible to all templates: the piwik base URL for the current request
$this->piwikUrl = Piwik_Url::getCurrentUrlWithoutFileName();
}