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


PHP SettingsServer::isArchivePhpTriggered方法代码示例

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


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

示例1: getSelectQueryString

 public function getSelectQueryString(SegmentExpression $segmentExpression, $select, $from, $where, $bind, $groupBy, $orderBy, $limit)
 {
     $result = parent::getSelectQueryString($segmentExpression, $select, $from, $where, $bind, $groupBy, $orderBy, $limit);
     $prefixParts = array();
     if (SettingsServer::isArchivePhpTriggered()) {
         $prefixParts[] = 'trigger = CronArchive';
     }
     $idSegments = $this->getSegmentIdOfExpression($segmentExpression);
     if (!empty($idSegments)) {
         $prefixParts[] = "idSegments = [" . implode(', ', $idSegments) . "]";
     }
     if (!empty($prefixParts)) {
         $result['sql'] = "/* " . implode(', ', $prefixParts) . " */\n" . $result['sql'];
     }
     return $result;
 }
开发者ID:diosmosis,项目名称:piwik,代码行数:16,代码来源:SegmentQueryDecorator.php

示例2: getPiwikUrl

 /**
  * Returns the URL to this Piwik instance, eg. **http://demo.piwik.org/** or **http://example.org/piwik/**.
  *
  * @return string
  * @api
  */
 public static function getPiwikUrl()
 {
     $url = Option::get(self::OPTION_PIWIK_URL);
     $isPiwikCoreDispatching = defined('PIWIK_ENABLE_DISPATCH') && PIWIK_ENABLE_DISPATCH;
     if (Common::isPhpCliMode() || SettingsServer::isArchivePhpTriggered() || !$isPiwikCoreDispatching) {
         return $url;
     }
     $currentUrl = Common::sanitizeInputValue(Url::getCurrentUrlWithoutFileName());
     // when script is called from /misc/cron/archive.php, Piwik URL is /index.php
     $currentUrl = str_replace("/misc/cron", "", $currentUrl);
     if (empty($url) || $currentUrl != $url) {
         if (strlen($currentUrl) >= strlen('http://a/')) {
             self::overwritePiwikUrl($currentUrl);
         }
         $url = $currentUrl;
     }
     if (ProxyHttp::isHttps()) {
         $url = str_replace("http://", "https://", $url);
     }
     return $url;
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:27,代码来源:SettingsPiwik.php

示例3: shouldRethrowException

 public static function shouldRethrowException()
 {
     // If we are in no dispatch mode, eg. a script reusing Piwik libs,
     // then we should return the exception directly, rather than trigger the event "bad config file"
     // which load the HTML page of the installer with the error.
     return defined('PIWIK_ENABLE_DISPATCH') && !PIWIK_ENABLE_DISPATCH || Common::isPhpCliMode() || SettingsServer::isArchivePhpTriggered();
 }
开发者ID:drabberhorizon,项目名称:ActiveNative,代码行数:7,代码来源:FrontController.php

示例4: isRequestAuthorizedToArchive

 public static function isRequestAuthorizedToArchive()
 {
     return Rules::isBrowserTriggerEnabled() || SettingsServer::isArchivePhpTriggered();
 }
开发者ID:diosmosis,项目名称:piwik,代码行数:4,代码来源:Rules.php

示例5: getPiwikUrl

 /**
  * Returns the URL to this Piwik instance, eg. **http://demo.piwik.org/** or **http://example.org/piwik/**.
  *
  * @return string
  * @api
  */
 public static function getPiwikUrl()
 {
     // Only set in tests
     if (self::$piwikUrlCache !== null) {
         return self::$piwikUrlCache;
     }
     $key = 'piwikUrl';
     $url = Option::get($key);
     if (Common::isPhpCliMode() || SettingsServer::isArchivePhpTriggered() || defined('PIWIK_MODE_ARCHIVE')) {
         return $url;
     }
     $currentUrl = Common::sanitizeInputValue(Url::getCurrentUrlWithoutFileName());
     if (empty($url) || $currentUrl != $url) {
         if (strlen($currentUrl) >= strlen('http://a/')) {
             Option::set($key, $currentUrl, $autoLoad = true);
         }
         $url = $currentUrl;
     }
     return $url;
 }
开发者ID:KiwiJuicer,项目名称:handball-dachau,代码行数:26,代码来源:SettingsPiwik.php

示例6: define

<?php

// Good old test proxy endpoints have some commons
if (!defined('PIWIK_INCLUDE_PATH')) {
    define('PIWIK_INCLUDE_PATH', realpath(dirname(__FILE__)) . '/../../../');
}
if (!defined('PIWIK_USER_PATH')) {
    define('PIWIK_USER_PATH', PIWIK_INCLUDE_PATH);
}
require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php') ? PIWIK_INCLUDE_PATH . '/vendor/autoload.php' : PIWIK_INCLUDE_PATH . '/../../autoload.php';
// Piwik is installed as a dependency
require_once PIWIK_INCLUDE_PATH . '/core/EventDispatcher.php';
require_once PIWIK_INCLUDE_PATH . '/core/Piwik.php';
require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/TestingEnvironment.php';
if (file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')) {
    $vendorDirectory = PIWIK_INCLUDE_PATH . '/vendor';
} else {
    $vendorDirectory = PIWIK_INCLUDE_PATH . '/../..';
}
require_once $vendorDirectory . '/autoload.php';
require_once $vendorDirectory . '/mustangostang/spyc/Spyc.php';
require_once $vendorDirectory . '/piwik/device-detector/DeviceDetector.php';
\Piwik\SettingsServer::setMaxExecutionTime(0);
// Make sure Data processed in cron core:archive command is not being purged instantly (useful for: Integration/ArchiveCronTest)
if (\Piwik\SettingsServer::isArchivePhpTriggered()) {
    \Piwik\ArchiveProcessor\Rules::disablePurgeOutdatedArchives();
}
开发者ID:a4tunado,项目名称:piwik,代码行数:28,代码来源:includes.php

示例7: isRequestAuthorizedToArchive

 protected static function isRequestAuthorizedToArchive()
 {
     return !self::$archivingDisabledByTests && (Rules::isBrowserTriggerEnabled() || Common::isPhpCliMode() || Piwik::isUserIsSuperUser() && SettingsServer::isArchivePhpTriggered());
 }
开发者ID:KiwiJuicer,项目名称:handball-dachau,代码行数:4,代码来源:Rules.php


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