PHP Class SeatGeek\Sixpack\Session\Base

Datei anzeigen Open project: seatgeek/sixpack-php

Protected Properties

Property Type Description
$baseUrl configuration
$clientId
$cookiePrefix
$timeout

Public Methods

Method Description
__construct ( $options = [] )
convert ( string $experiment, mixed $kpi = null ) : SeatGeek\Sixpack\Response\Conversion convert
getClientid ( )
getTimeout ( )
isForced ( $experiment )
participate ( string $experiment, array $alternatives, $traffic_fraction = 1 ) : SeatGeek\Sixpack\Response\Participation Participate in an experiment
setTimeout ( $milliseconds )
status ( )

Protected Methods

Method Description
forceAlternative ( string $experiment, array $alternatives ) : array Force the alternative
generateClientId ( )
getIpAddress ( )
getUserAgent ( )
retrieveClientId ( )
sendRequest ( string $endpoint, array $params = [] ) : array Send the request to sixpack
setClientId ( $clientId = null )
storeClientId ( $clientId )

Method Details

__construct() public method

public __construct ( $options = [] )

convert() public method

convert
public convert ( string $experiment, mixed $kpi = null ) : SeatGeek\Sixpack\Response\Conversion
$experiment string
$kpi mixed
return SeatGeek\Sixpack\Response\Conversion

forceAlternative() protected method

Force the alternative
protected forceAlternative ( string $experiment, array $alternatives ) : array
$experiment string
$alternatives array
return array

generateClientId() protected method

protected generateClientId ( )

getClientid() public method

public getClientid ( )

getIpAddress() protected method

protected getIpAddress ( )

getTimeout() public method

public getTimeout ( )

getUserAgent() protected method

protected getUserAgent ( )

isForced() public method

public isForced ( $experiment )

participate() public method

Participate in an experiment
public participate ( string $experiment, array $alternatives, $traffic_fraction = 1 ) : SeatGeek\Sixpack\Response\Participation
$experiment string name of the experiment
$alternatives array the alternatives to pick from
return SeatGeek\Sixpack\Response\Participation

retrieveClientId() protected method

protected retrieveClientId ( )

sendRequest() protected method

Send the request to sixpack
protected sendRequest ( string $endpoint, array $params = [] ) : array
$endpoint string api end point
$params array
return array

setClientId() protected method

protected setClientId ( $clientId = null )

setTimeout() public method

public setTimeout ( $milliseconds )

status() public method

public status ( )

storeClientId() protected method

protected storeClientId ( $clientId )

Property Details

$baseUrl protected_oe property

configuration
protected $baseUrl

$clientId protected_oe property

protected $clientId

$cookiePrefix protected_oe property

protected $cookiePrefix

$timeout protected_oe property

protected $timeout