PHP Класс Piwik\SettingsServer

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
setMemoryLimit ( integer $minimumMemoryLimit ) : boolean Set PHP memory limit

Описание методов

getMemoryLimitValue() публичный статический Метод

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.
См. также: http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
public static getMemoryLimitValue ( ) : integer | boolean
Результат integer | boolean memory limit in megabytes, or false if there is no limit

isArchivePhpTriggered() публичный статический Метод

Helpful for error handling: directly throw error without HTML (eg. when DB is down).
public static isArchivePhpTriggered ( ) : boolean
Результат boolean

isGdExtensionEnabled() публичный статический Метод

_Note: ImageGraph and the sparkline report visualization depend on the GD extension._
public static isGdExtensionEnabled ( ) : boolean
Результат boolean

isIIS() публичный статический Метод

Returns true if running on Microsoft IIS 7 (or above), false if otherwise.
public static isIIS ( ) : boolean
Результат boolean

isTimezoneSupportEnabled() публичный статический Метод

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
Результат boolean

isTrackerApiRequest() публичный статический Метод

Returns true if the current request is a Tracker request.
public static isTrackerApiRequest ( ) : boolean
Результат boolean true if the current request is a Tracking API Request (ie. piwik.php)

isWindows() публичный статический Метод

Returns true if running on a Windows operating system, false if otherwise.
С версии: 0.6.5
public static isWindows ( ) : boolean
Результат boolean

raiseMemoryLimitIfNecessary() публичный статический Метод

Raise PHP memory limit if below the minimum required
public static raiseMemoryLimitIfNecessary ( ) : boolean
Результат boolean true if set; false otherwise

setIsNotTrackerApiRequest() публичный статический Метод

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

setIsTrackerApiRequest() публичный статический Метод

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

setMaxExecutionTime() публичный статический Метод

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

setMemoryLimit() защищенный статический Метод

Note: system settings may prevent scripts from overriding the master value
protected static setMemoryLimit ( integer $minimumMemoryLimit ) : boolean
$minimumMemoryLimit integer
Результат boolean true if set; false otherwise