PHP Class Piwik\SettingsServer

Afficher le fichier Open project: piwik/piwik Class Usage Examples

Méthodes publiques

Méthode Description
getMemoryLimitValue ( ) : integer | boolean Get php memory_limit (in Megabytes)
isArchivePhpTriggered ( ) : boolean Returns true if the current script execution was triggered by the cron archiving script.
isGdExtensionEnabled ( ) : boolean Returns true if the GD PHP extension is available, false if otherwise.
isIIS ( ) : boolean Returns true if running on Microsoft IIS 7 (or above), false if otherwise.
isTimezoneSupportEnabled ( ) : boolean Returns true if this PHP version/build supports timezone manipulation (e.g., php >= 5.2, or compiled with **EXPERIMENTAL_DATE_SUPPORT=1** for php < 5.2).
isTrackerApiRequest ( ) : boolean Returns true if the current request is a Tracker request.
isWindows ( ) : boolean Returns true if running on a Windows operating system, false if otherwise.
raiseMemoryLimitIfNecessary ( ) : boolean Raise PHP memory limit if below the minimum required
setIsNotTrackerApiRequest ( ) Set the current request is not a tracker API request
setIsTrackerApiRequest ( ) Mark the current request as a Tracker API request
setMaxExecutionTime ( integer $executionTime ) Set maximum script execution time.

Méthodes protégées

Méthode Description
setMemoryLimit ( integer $minimumMemoryLimit ) : boolean Set PHP memory limit

Method Details

getMemoryLimitValue() public static méthode

Prior to PHP 5.2.1, or on Windows, --enable-memory-limit is not a compile-time default, so ini_get('memory_limit') may return false.
See also: http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
public static getMemoryLimitValue ( ) : integer | boolean
Résultat integer | boolean memory limit in megabytes, or false if there is no limit

isArchivePhpTriggered() public static méthode

Helpful for error handling: directly throw error without HTML (eg. when DB is down).
public static isArchivePhpTriggered ( ) : boolean
Résultat boolean

isGdExtensionEnabled() public static méthode

_Note: ImageGraph and the sparkline report visualization depend on the GD extension._
public static isGdExtensionEnabled ( ) : boolean
Résultat boolean

isIIS() public static méthode

Returns true if running on Microsoft IIS 7 (or above), false if otherwise.
public static isIIS ( ) : boolean
Résultat boolean

isTimezoneSupportEnabled() public static méthode

Returns true if this PHP version/build supports timezone manipulation (e.g., php >= 5.2, or compiled with **EXPERIMENTAL_DATE_SUPPORT=1** for php < 5.2).
public static isTimezoneSupportEnabled ( ) : boolean
Résultat boolean

isTrackerApiRequest() public static méthode

Returns true if the current request is a Tracker request.
public static isTrackerApiRequest ( ) : boolean
Résultat boolean true if the current request is a Tracking API Request (ie. piwik.php)

isWindows() public static méthode

Returns true if running on a Windows operating system, false if otherwise.
Since: 0.6.5
public static isWindows ( ) : boolean
Résultat boolean

raiseMemoryLimitIfNecessary() public static méthode

Raise PHP memory limit if below the minimum required
public static raiseMemoryLimitIfNecessary ( ) : boolean
Résultat boolean true if set; false otherwise

setIsNotTrackerApiRequest() public static méthode

Set the current request is not a tracker API request
public static setIsNotTrackerApiRequest ( )

setIsTrackerApiRequest() public static méthode

Mark the current request as a Tracker API request
public static setIsTrackerApiRequest ( )

setMaxExecutionTime() public static méthode

Set maximum script execution time.
public static setMaxExecutionTime ( integer $executionTime )
$executionTime integer max execution time in seconds (0 = no limit)

setMemoryLimit() protected static méthode

Note: system settings may prevent scripts from overriding the master value
protected static setMemoryLimit ( integer $minimumMemoryLimit ) : boolean
$minimumMemoryLimit integer
Résultat boolean true if set; false otherwise