當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。