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


PHP Rules::setTodayArchiveTimeToLive方法代码示例

本文整理汇总了PHP中Piwik\ArchiveProcessor\Rules::setTodayArchiveTimeToLive方法的典型用法代码示例。如果您正苦于以下问题:PHP Rules::setTodayArchiveTimeToLive方法的具体用法?PHP Rules::setTodayArchiveTimeToLive怎么用?PHP Rules::setTodayArchiveTimeToLive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik\ArchiveProcessor\Rules的用法示例。


在下文中一共展示了Rules::setTodayArchiveTimeToLive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setArchiveSettings

 /**
  * @internal
  */
 public function setArchiveSettings($enableBrowserTriggerArchiving, $todayArchiveTimeToLive)
 {
     Piwik::checkUserHasSuperUserAccess();
     if (!Controller::isGeneralSettingsAdminEnabled()) {
         throw new Exception('General settings admin is ont enabled');
     }
     Rules::setBrowserTriggerArchiving((bool) $enableBrowserTriggerArchiving);
     Rules::setTodayArchiveTimeToLive($todayArchiveTimeToLive);
     return true;
 }
开发者ID:piwik,项目名称:piwik,代码行数:13,代码来源:API.php

示例2: saveGeneralSettings

 private function saveGeneralSettings()
 {
     if (!self::isGeneralSettingsAdminEnabled()) {
         // General settings + Beta channel + SMTP settings is disabled
         return;
     }
     // General Setting
     $enableBrowserTriggerArchiving = Common::getRequestVar('enableBrowserTriggerArchiving');
     $todayArchiveTimeToLive = Common::getRequestVar('todayArchiveTimeToLive');
     Rules::setBrowserTriggerArchiving((bool) $enableBrowserTriggerArchiving);
     Rules::setTodayArchiveTimeToLive($todayArchiveTimeToLive);
     // update beta channel setting
     $debug = Config::getInstance()->Debug;
     $debug['allow_upgrades_to_beta'] = Common::getRequestVar('enableBetaReleaseCheck', '0', 'int');
     Config::getInstance()->Debug = $debug;
     // Update email settings
     $mail = array();
     $mail['transport'] = Common::getRequestVar('mailUseSmtp') == '1' ? 'smtp' : '';
     $mail['port'] = Common::getRequestVar('mailPort', '');
     $mail['host'] = Common::unsanitizeInputValue(Common::getRequestVar('mailHost', ''));
     $mail['type'] = Common::getRequestVar('mailType', '');
     $mail['username'] = Common::unsanitizeInputValue(Common::getRequestVar('mailUsername', ''));
     $mail['password'] = Common::unsanitizeInputValue(Common::getRequestVar('mailPassword', ''));
     $mail['encryption'] = Common::getRequestVar('mailEncryption', '');
     Config::getInstance()->mail = $mail;
     // update trusted host settings
     $trustedHosts = Common::getRequestVar('trustedHosts', false, 'json');
     if ($trustedHosts !== false) {
         Url::saveTrustedHostnameInConfig($trustedHosts);
     }
     Config::getInstance()->forceSave();
     $pluginUpdateCommunication = new UpdateCommunication();
     if (Common::getRequestVar('enablePluginUpdateCommunication', '0', 'int')) {
         $pluginUpdateCommunication->enable();
     } else {
         $pluginUpdateCommunication->disable();
     }
 }
开发者ID:carriercomm,项目名称:piwik,代码行数:38,代码来源:Controller.php

示例3: saveGeneralSettings

 private function saveGeneralSettings()
 {
     if (!$this->isGeneralSettingsAdminEnabled()) {
         // General settings + Beta channel + SMTP settings is disabled
         return;
     }
     // General Setting
     $enableBrowserTriggerArchiving = Common::getRequestVar('enableBrowserTriggerArchiving');
     $todayArchiveTimeToLive = Common::getRequestVar('todayArchiveTimeToLive');
     Rules::setBrowserTriggerArchiving((bool) $enableBrowserTriggerArchiving);
     Rules::setTodayArchiveTimeToLive($todayArchiveTimeToLive);
     // update beta channel setting
     $debug = Config::getInstance()->Debug;
     $debug['allow_upgrades_to_beta'] = Common::getRequestVar('enableBetaReleaseCheck', '0', 'int');
     Config::getInstance()->Debug = $debug;
     // Update email settings
     $mail = array();
     $mail['transport'] = Common::getRequestVar('mailUseSmtp') == '1' ? 'smtp' : '';
     $mail['port'] = Common::getRequestVar('mailPort', '');
     $mail['host'] = Common::unsanitizeInputValue(Common::getRequestVar('mailHost', ''));
     $mail['type'] = Common::getRequestVar('mailType', '');
     $mail['username'] = Common::unsanitizeInputValue(Common::getRequestVar('mailUsername', ''));
     $mail['password'] = Common::unsanitizeInputValue(Common::getRequestVar('mailPassword', ''));
     $mail['encryption'] = Common::getRequestVar('mailEncryption', '');
     Config::getInstance()->mail = $mail;
 }
开发者ID:KiwiJuicer,项目名称:handball-dachau,代码行数:26,代码来源:Controller.php


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