class Visit extends Model

A player's visit on the website

Traits

A timestamp column

Constants

TABLE

The name of the database table used for queries

Methods

static Visit
enterVisit(int $visitor, string $ip, string $host, string $user_agent, string $referrer, string $timestamp = 'now')

Enter a new visit into the database

static QueryBuilder
getQueryBuilder()

Get a query builder for players

getPlayer()

Get the visiting player

string
getIpAddress()

Get the IP address of the player

string
getHost()

Get the visiting host

string
getUserAgent()

Get the visitor's user agent

string
getReferrer()

Get the visitor's referer or referrer

Details

at line line 76
static Visit enterVisit(int $visitor, string $ip, string $host, string $user_agent, string $referrer, string $timestamp = 'now')

Enter a new visit into the database

Parameters

int $visitor The visitor's id
string $ip The visitor's ip address
string $host The visitor's host
string $user_agent The visitor's user agent
string $referrer The HTTP_REFERRER of the visit
string $timestamp The timestamp of the visit

Return Value

Visit An object representing the visit that was just entered

at line line 94
static QueryBuilder getQueryBuilder()

Get a query builder for players

Return Value

QueryBuilder

at line line 109
Player getPlayer()

Get the visiting player

Return Value

Player

at line line 118
string getIpAddress()

Get the IP address of the player

Return Value

string

at line line 127
string getHost()

Get the visiting host

Return Value

string

at line line 136
string getUserAgent()

Get the visitor's user agent

Return Value

string

at line line 145
string getReferrer()

Get the visitor's referer or referrer

Return Value

string