PHP 클래스 Piwik\Tracker\Request

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

보호된 프로퍼티들

프로퍼티 타입 설명
$isAuthenticated
$params array
$rawParams
$tokenAuth

공개 메소드들

메소드 설명
__construct ( $params, boolean | string $tokenAuth = false )
authenticateSuperUserOrAdmin ( $tokenAuth, $idSite )
getBrowserLanguage ( ) : string Returns the language the visitor is viewing.
getCurrentTimestamp ( )
getCustomVariables ( $scope )
getCustomVariablesInPageScope ( )
getCustomVariablesInVisitScope ( )
getDaysSinceFirstVisit ( ) : float | integer
getDaysSinceLastOrder ( ) : boolean | float | integer
getDaysSinceLastVisit ( ) : float | integer
getForcedUserId ( )
getForcedVisitorId ( )
getGoalRevenue ( $defaultGoalRevenue )
getIdSite ( )
getIp ( )
getIpString ( ) : mixed | string
getLocalTime ( ) : string
getMetadata ( string $pluginName, string $key ) : mixed Get a request metadata value. Returns null if none exists.
getPageGenerationTime ( ) 1 hour
getParam ( $name )
getParams ( )
getPlugins ( )
getRawParams ( ) : array Get the params that were originally passed to the instance. These params do not contain any params that were added within this object.
getTokenAuth ( )
getUserAgent ( )
getUserIdHashed ( $userId ) : string Matches implementation of PiwikTracker::getUserIdHashed
getVisitCount ( ) : integer | mixed
getVisitorId ( ) Returns the ID from the request in this order: return from a given User ID, or from a Tracking API forced Visitor ID, or from a Visitor ID from 3rd party (optional) cookies, or from a given Visitor Id from 1st party?
isAuthenticated ( ) : boolean
isEmptyRequest ( )
setCurrentTimestamp ( $timestamp )
setMetadata ( string $pluginName, string $key, mixed $value ) Set a request metadata value.
setParam ( $name, $value )
setThirdPartyCookie ( $idVisitor ) Update the cookie information.
truncateCustomVariable ( $input )

보호된 메소드들

메소드 설명
authenticateTrackingApi ( $tokenAuth ) This method allows to set custom IP + server time + visitor ID, when using Tracking API.
getCookieExpire ( )
getCookieName ( )
getCookiePath ( )
getCurrentDate ( string $format = "Y-m-d" ) : string Returns the current date in the "Y-m-d" PHP format
getCustomTimestamp ( )
isTimestampValid ( $time, $now = null ) : boolean Returns true if the timestamp is valid ie. timestamp is sometime in the last 10 years and is not in the future.
makeThirdPartyCookieUID ( )
shouldUseThirdPartyCookie ( )

비공개 메소드들

메소드 설명
hasParam ( $name )
truncateIdAsVisitorId ( $idVisitor ) : string

메소드 상세

__construct() 공개 메소드

public __construct ( $params, boolean | string $tokenAuth = false )
$params
$tokenAuth boolean | string

authenticateSuperUserOrAdmin() 공개 정적인 메소드

public static authenticateSuperUserOrAdmin ( $tokenAuth, $idSite )

authenticateTrackingApi() 보호된 메소드

These two attributes can be only set by the Super User (passing token_auth).
protected authenticateTrackingApi ( $tokenAuth )

getBrowserLanguage() 공개 메소드

Returns the language the visitor is viewing.
public getBrowserLanguage ( ) : string
리턴 string browser language code, eg. "en-gb,en;q=0.5"

getCookieExpire() 보호된 메소드

protected getCookieExpire ( )

getCookieName() 보호된 메소드

protected getCookieName ( )

getCookiePath() 보호된 메소드

protected getCookiePath ( )

getCurrentDate() 보호된 메소드

Returns the current date in the "Y-m-d" PHP format
protected getCurrentDate ( string $format = "Y-m-d" ) : string
$format string
리턴 string

getCurrentTimestamp() 공개 메소드

public getCurrentTimestamp ( )

getCustomTimestamp() 보호된 메소드

protected getCustomTimestamp ( )

getCustomVariables() 공개 메소드

사용 중단: since Piwik 2.10.0. Use Request::getCustomVariablesInPageScope() or Request::getCustomVariablesInVisitScope() instead. When we "remove" this method we will only set visibility to "private" and pass $parameter = _cvar|cvar as an argument instead of $scope
public getCustomVariables ( $scope )

getCustomVariablesInPageScope() 공개 메소드

getCustomVariablesInVisitScope() 공개 메소드

getDaysSinceFirstVisit() 공개 메소드

getDaysSinceLastOrder() 공개 메소드

getDaysSinceLastVisit() 공개 메소드

public getDaysSinceLastVisit ( ) : float | integer
리턴 float | integer

getForcedUserId() 공개 메소드

public getForcedUserId ( )

getForcedVisitorId() 공개 메소드

public getForcedVisitorId ( )

getGoalRevenue() 공개 메소드

public getGoalRevenue ( $defaultGoalRevenue )

getIdSite() 공개 메소드

public getIdSite ( )

getIp() 공개 메소드

public getIp ( )

getIpString() 공개 메소드

public getIpString ( ) : mixed | string
리턴 mixed | string

getLocalTime() 공개 메소드

public getLocalTime ( ) : string
리턴 string

getMetadata() 공개 메소드

Get a request metadata value. Returns null if none exists.
public getMetadata ( string $pluginName, string $key ) : mixed
$pluginName string eg, `'Actions'`, `'Goals'`, `'YourPlugin'`
$key string
리턴 mixed

getPageGenerationTime() 공개 메소드

1 hour

getParam() 공개 메소드

public getParam ( $name )

getParams() 공개 메소드

public getParams ( )

getPlugins() 공개 메소드

public getPlugins ( )

getRawParams() 공개 메소드

Get the params that were originally passed to the instance. These params do not contain any params that were added within this object.
public getRawParams ( ) : array
리턴 array

getTokenAuth() 공개 메소드

public getTokenAuth ( )

getUserAgent() 공개 메소드

public getUserAgent ( )

getUserIdHashed() 공개 메소드

Matches implementation of PiwikTracker::getUserIdHashed
public getUserIdHashed ( $userId ) : string
$userId
리턴 string

getVisitCount() 공개 메소드

public getVisitCount ( ) : integer | mixed
리턴 integer | mixed

getVisitorId() 공개 메소드

Returns the ID from the request in this order: return from a given User ID, or from a Tracking API forced Visitor ID, or from a Visitor ID from 3rd party (optional) cookies, or from a given Visitor Id from 1st party?
public getVisitorId ( )

isAuthenticated() 공개 메소드

public isAuthenticated ( ) : boolean
리턴 boolean

isEmptyRequest() 공개 메소드

public isEmptyRequest ( )

isTimestampValid() 보호된 메소드

Returns true if the timestamp is valid ie. timestamp is sometime in the last 10 years and is not in the future.
protected isTimestampValid ( $time, $now = null ) : boolean
$time int Timestamp to test
$now int Current timestamp
리턴 boolean

makeThirdPartyCookieUID() 보호된 메소드

protected makeThirdPartyCookieUID ( )

setCurrentTimestamp() 공개 메소드

public setCurrentTimestamp ( $timestamp )

setMetadata() 공개 메소드

Set a request metadata value.
public setMetadata ( string $pluginName, string $key, mixed $value )
$pluginName string eg, `'Actions'`, `'Goals'`, `'YourPlugin'`
$key string
$value mixed

setParam() 공개 메소드

public setParam ( $name, $value )

setThirdPartyCookie() 공개 메소드

Update the cookie information.
public setThirdPartyCookie ( $idVisitor )

shouldUseThirdPartyCookie() 보호된 메소드

truncateCustomVariable() 공개 정적인 메소드

public static truncateCustomVariable ( $input )

프로퍼티 상세

$isAuthenticated 보호되어 있는 프로퍼티

protected $isAuthenticated

$params 보호되어 있는 프로퍼티

protected array $params
리턴 array

$rawParams 보호되어 있는 프로퍼티

protected $rawParams

$tokenAuth 보호되어 있는 프로퍼티

protected $tokenAuth