本文整理匯總了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();
}