當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Piwik::isPhpCliMode方法代碼示例

本文整理匯總了PHP中Piwik::isPhpCliMode方法的典型用法代碼示例。如果您正苦於以下問題:PHP Piwik::isPhpCliMode方法的具體用法?PHP Piwik::isPhpCliMode怎麽用?PHP Piwik::isPhpCliMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Piwik的用法示例。


在下文中一共展示了Piwik::isPhpCliMode方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getFormattedString

 public static function getFormattedString($string)
 {
     if (Piwik::isPhpCliMode()) {
         $string = str_replace(array('<br>', '<br />', '<br/>'), "\n", $string);
         $string = strip_tags($string);
     }
     return $string;
 }
開發者ID:Doluci,項目名稱:tomatocart,代碼行數:8,代碼來源:Log.php

示例2: runUpdaterAndExit

 public function runUpdaterAndExit($updater, $componentsWithUpdateFile)
 {
     if (empty($componentsWithUpdateFile)) {
         return;
     }
     if (Piwik::isPhpCliMode()) {
         Piwik::setMaxExecutionTime(0);
         $view = Piwik_View::factory('update_welcome');
         $this->doWelcomeUpdates($view, $componentsWithUpdateFile);
         if (!$this->coreError) {
             $view = Piwik_View::factory('update_database_done');
             $this->doExecuteUpdates($view, $updater, $componentsWithUpdateFile);
         }
     } else {
         if (Piwik_Common::getRequestVar('updateCorePlugins', 0, 'integer') == 1) {
             $view = Piwik_View::factory('update_database_done');
             $this->doExecuteUpdates($view, $updater, $componentsWithUpdateFile);
         } else {
             $view = Piwik_View::factory('update_welcome');
             $this->doWelcomeUpdates($view, $componentsWithUpdateFile);
         }
     }
     exit;
 }
開發者ID:ntulip,項目名稱:piwik,代碼行數:24,代碼來源:Controller.php

示例3: runUpdaterAndExit

 public function runUpdaterAndExit()
 {
     $updater = new Piwik_Updater();
     $componentsWithUpdateFile = Piwik_CoreUpdater::getComponentUpdates($updater);
     if (empty($componentsWithUpdateFile)) {
         return;
     }
     Piwik::setMaxExecutionTime(0);
     if (Piwik::isPhpCliMode()) {
         $view = Piwik_View::factory('update_welcome');
         $this->doWelcomeUpdates($view, $componentsWithUpdateFile);
         if (!$this->coreError) {
             $view = Piwik_View::factory('update_database_done');
             $this->doExecuteUpdates($view, $updater, $componentsWithUpdateFile);
         }
     } else {
         if (Piwik_Common::getRequestVar('updateCorePlugins', 0, 'integer') == 1) {
             $this->warningMessages = array();
             $view = Piwik_View::factory('update_database_done');
             $this->doExecuteUpdates($view, $updater, $componentsWithUpdateFile);
         } else {
             $view = Piwik_View::factory('update_welcome');
             $view->queries = $updater->getSqlQueriesToExecute();
             $this->doWelcomeUpdates($view, $componentsWithUpdateFile);
         }
     }
     exit;
 }
開發者ID:Doluci,項目名稱:tomatocart,代碼行數:28,代碼來源:Controller.php

示例4: isArchivingDisabled

 /**
  * Returns true if, for some reasons, triggering the archiving is disabled.
  *
  * @return bool
  */
 protected function isArchivingDisabled()
 {
     static $archivingIsDisabled = null;
     if (is_null($archivingIsDisabled)) {
         $archivingIsDisabled = false;
         $enableBrowserArchivingTriggering = (bool) Zend_Registry::get('config')->General->enable_browser_archiving_triggering;
         if ($enableBrowserArchivingTriggering == false) {
             if (!Piwik::isPhpCliMode()) {
                 $archivingIsDisabled = true;
             }
         }
     }
     return $archivingIsDisabled;
 }
開發者ID:BackupTheBerlios,項目名稱:oos-svn,代碼行數:19,代碼來源:ArchiveProcessing.php

示例5: runUpdaterAndExit

 public function runUpdaterAndExit($updater, $componentsWithUpdateFile)
 {
     if (empty($componentsWithUpdateFile)) {
         return;
     }
     if (Piwik::isPhpCliMode()) {
         @set_time_limit(0);
         $view = new Piwik_View('CoreUpdater/templates/cli_update_welcome.tpl', null, false);
         $this->doWelcomeUpdates($view, $componentsWithUpdateFile);
         if (!$this->coreError) {
             $view = new Piwik_View('CoreUpdater/templates/cli_update_database_done.tpl', null, false);
             $this->doExecuteUpdates($view, $updater, $componentsWithUpdateFile);
         }
     } else {
         if (Piwik_Common::getRequestVar('updateCorePlugins', 0, 'integer') == 1) {
             $view = new Piwik_View('CoreUpdater/templates/update_database_done.tpl');
             $this->doExecuteUpdates($view, $updater, $componentsWithUpdateFile);
         } else {
             $view = new Piwik_View('CoreUpdater/templates/update_welcome.tpl');
             $this->doWelcomeUpdates($view, $componentsWithUpdateFile);
         }
     }
     exit;
 }
開發者ID:BackupTheBerlios,項目名稱:oos-svn,代碼行數:24,代碼來源:Controller.php


注:本文中的Piwik::isPhpCliMode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。