本文整理汇总了PHP中Piwik_Common::isArchivePhpTriggered方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_Common::isArchivePhpTriggered方法的具体用法?PHP Piwik_Common::isArchivePhpTriggered怎么用?PHP Piwik_Common::isArchivePhpTriggered使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik_Common
的用法示例。
在下文中一共展示了Piwik_Common::isArchivePhpTriggered方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isRequestAuthorizedToArchive
protected static function isRequestAuthorizedToArchive()
{
return !self::$forceDisableArchiving && (self::isBrowserTriggerArchivingEnabled() || Piwik_Common::isPhpCliMode() || Piwik::isUserIsSuperUser() && Piwik_Common::isArchivePhpTriggered());
}
示例2: raiseMemoryLimitIfNecessary
/**
* Raise PHP memory limit if below the minimum required
*
* @return bool true if set; false otherwise
*/
public static function raiseMemoryLimitIfNecessary()
{
$memoryLimit = self::getMemoryLimitValue();
if ($memoryLimit === false) {
return false;
}
$minimumMemoryLimit = Zend_Registry::get('config')->General->minimum_memory_limit;
if (Piwik_Common::isArchivePhpTriggered() && Piwik::isUserIsSuperUser()) {
// archive.php: no time limit, high memory limit
self::setMaxExecutionTime(0);
$minimumMemoryLimitWhenArchiving = Zend_Registry::get('config')->General->minimum_memory_limit_when_archiving;
if ($memoryLimit < $minimumMemoryLimitWhenArchiving) {
return self::setMemoryLimit($minimumMemoryLimitWhenArchiving);
}
return false;
}
if ($memoryLimit < $minimumMemoryLimit) {
return self::setMemoryLimit($minimumMemoryLimit);
}
return false;
}
示例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.
// This is at least required for misc/cron/archive.php and useful to all other scripts
return defined('PIWIK_ENABLE_DISPATCH') && !PIWIK_ENABLE_DISPATCH || Piwik_Common::isPhpCliMode() || Piwik_Common::isArchivePhpTriggered();
}