PHP 클래스 Piwik\SettingsPiwik

파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 메소드들

메소드 설명
checkPiwikServerWorking ( $piwikServerUrl, boolean $acceptInvalidSSLCertificates = false ) : boolean Returns true if the Piwik server appears to be working.
getCurrentGitBranch ( )
getKnownSegmentsToArchive ( ) : array Returns every stored segment to pre-process for each site during cron archiving.
getKnownSegmentsToArchiveForSite ( integer $idSite ) : string[] Returns the list of stored segments to pre-process for an individual site when executing cron archiving.
getPiwikUrl ( ) : string Returns the URL to this Piwik instance, eg. **http://demo.piwik.org/** or **http://example.org/piwik/**.
getSalt ( ) : string Get salt from [General] section
getWebsitesCountToDisplay ( ) : integer Number of websites to show in the Website selector
isAutoUpdateEnabled ( ) : boolean Detect whether user has enabled auto updates. Please note this config is a bit misleading. It is currently actually used for 2 things: To disable making any connections back to Piwik, and to actually disable the auto update of core and plugins.
isAutoUpdatePossible ( ) : boolean Detects whether an auto update can be made. An update is possible if the user is not on multiple servers and if automatic updates are actually enabled. If a user is running Piwik on multiple servers an update is not possible as it would be installed only on one server instead of all of them. Also if a user has disabled automatic updates we cannot perform any automatic updates.
isGitDeployment ( ) : boolean Returns true if Piwik is deployed using git FAQ: http://piwik.org/faq/how-to-install/faq_18271/
isHttpsForced ( ) : boolean
isMultiServerEnvironment ( ) : boolean Returns true if Piwik is running on more than one server. For example in a load balanced environment. In this case we should not make changes to the config and not install a plugin via the UI as it would be only executed on one server.
isPiwikInstalled ( ) : boolean Return true if Piwik is installed (installation is done).
isSameFingerprintAcrossWebsites ( ) : boolean Note: this config settig is also checked in the InterSites plugin
isSegmentationEnabled ( ) : boolean Returns true if segmentation is allowed for this user, false if otherwise.
isUniqueVisitorsEnabled ( string $periodLabel ) : boolean Returns true if unique visitors should be processed for the given period type.
isUserCredentialsSanityCheckEnabled ( ) : boolean Should Piwik check that the login & password have minimum length and valid characters?
overwritePiwikUrl ( $currentUrl )
rewriteMiscUserPathWithInstanceId ( $path ) : mixed If Piwik uses per-domain config file, make sure CustomLogo is unique

보호된 메소드들

메소드 설명
getPiwikInstanceId ( ) : string
rewritePathAppendPiwikInstanceId ( $pathToRewrite, $leadingPathToAppendHostnameTo ) : mixed

메소드 상세

checkPiwikServerWorking() 공개 정적인 메소드

If the Piwik server is in an error state (eg. some directories are not writable and Piwik displays error message), or if the Piwik server is "offline", this will return false..
public static checkPiwikServerWorking ( $piwikServerUrl, boolean $acceptInvalidSSLCertificates = false ) : boolean
$piwikServerUrl
$acceptInvalidSSLCertificates boolean
리턴 boolean

getCurrentGitBranch() 공개 정적인 메소드

public static getCurrentGitBranch ( )

getKnownSegmentsToArchive() 공개 정적인 메소드

Returns every stored segment to pre-process for each site during cron archiving.
public static getKnownSegmentsToArchive ( ) : array
리턴 array The list of stored segments that apply to all sites.

getKnownSegmentsToArchiveForSite() 공개 정적인 메소드

Returns the list of stored segments to pre-process for an individual site when executing cron archiving.
public static getKnownSegmentsToArchiveForSite ( integer $idSite ) : string[]
$idSite integer The ID of the site to get stored segments for.
리턴 string[] The list of stored segments that apply to the requested site.

getPiwikInstanceId() 보호된 정적인 메소드

protected static getPiwikInstanceId ( ) : string
리턴 string or False if not set

getPiwikUrl() 공개 정적인 메소드

Returns the URL to this Piwik instance, eg. **http://demo.piwik.org/** or **http://example.org/piwik/**.
public static getPiwikUrl ( ) : string
리턴 string

getSalt() 공개 정적인 메소드

Get salt from [General] section
public static getSalt ( ) : string
리턴 string

getWebsitesCountToDisplay() 공개 정적인 메소드

Number of websites to show in the Website selector
public static getWebsitesCountToDisplay ( ) : integer
리턴 integer

isAutoUpdateEnabled() 공개 정적인 메소드

Detect whether user has enabled auto updates. Please note this config is a bit misleading. It is currently actually used for 2 things: To disable making any connections back to Piwik, and to actually disable the auto update of core and plugins.
public static isAutoUpdateEnabled ( ) : boolean
리턴 boolean

isAutoUpdatePossible() 공개 정적인 메소드

Detects whether an auto update can be made. An update is possible if the user is not on multiple servers and if automatic updates are actually enabled. If a user is running Piwik on multiple servers an update is not possible as it would be installed only on one server instead of all of them. Also if a user has disabled automatic updates we cannot perform any automatic updates.
public static isAutoUpdatePossible ( ) : boolean
리턴 boolean

isGitDeployment() 공개 정적인 메소드

Returns true if Piwik is deployed using git FAQ: http://piwik.org/faq/how-to-install/faq_18271/
public static isGitDeployment ( ) : boolean
리턴 boolean

isHttpsForced() 공개 정적인 메소드

public static isHttpsForced ( ) : boolean
리턴 boolean

isMultiServerEnvironment() 공개 정적인 메소드

Returns true if Piwik is running on more than one server. For example in a load balanced environment. In this case we should not make changes to the config and not install a plugin via the UI as it would be only executed on one server.
public static isMultiServerEnvironment ( ) : boolean
리턴 boolean

isPiwikInstalled() 공개 정적인 메소드

Return true if Piwik is installed (installation is done).
public static isPiwikInstalled ( ) : boolean
리턴 boolean

isSameFingerprintAcrossWebsites() 공개 정적인 메소드

Note: this config settig is also checked in the InterSites plugin
public static isSameFingerprintAcrossWebsites ( ) : boolean
리턴 boolean

isSegmentationEnabled() 공개 정적인 메소드

Returns true if segmentation is allowed for this user, false if otherwise.
public static isSegmentationEnabled ( ) : boolean
리턴 boolean

isUniqueVisitorsEnabled() 공개 정적인 메소드

Unique visitor processing is controlled by the [General] enable_processing_unique_visitors_... INI config options. By default, unique visitors are processed only for day/week/month periods.
public static isUniqueVisitorsEnabled ( string $periodLabel ) : boolean
$periodLabel string `"day"`, `"week"`, `"month"`, `"year"` or `"range"`
리턴 boolean

isUserCredentialsSanityCheckEnabled() 공개 정적인 메소드

Should Piwik check that the login & password have minimum length and valid characters?
public static isUserCredentialsSanityCheckEnabled ( ) : boolean
리턴 boolean True if checks enabled; false otherwise

overwritePiwikUrl() 공개 정적인 메소드

public static overwritePiwikUrl ( $currentUrl )
$currentUrl

rewriteMiscUserPathWithInstanceId() 공개 정적인 메소드

If Piwik uses per-domain config file, make sure CustomLogo is unique
public static rewriteMiscUserPathWithInstanceId ( $path ) : mixed
$path
리턴 mixed

rewritePathAppendPiwikInstanceId() 보호된 정적인 메소드

protected static rewritePathAppendPiwikInstanceId ( $pathToRewrite, $leadingPathToAppendHostnameTo ) : mixed
$pathToRewrite
$leadingPathToAppendHostnameTo
리턴 mixed