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


PHP Piwik_View::addPiwikPath方法代码示例

本文整理汇总了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();
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:32,代码来源:View.php

示例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();
 }
开发者ID:klando,项目名称:pgpiwik,代码行数:27,代码来源:View.php


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