abstract class vB_Request

Traits

Properties

protected int $timeNow UNIX timestamp at the creation of request
protected $ipAddress
protected $altIp
protected $sessionHost
protected $userAgent
protected $referrer
protected $languageid
protected string $sessionClass
protected vB_Session $session

Methods

__sleep()

No description

__wakeup()

No description

__construct()

No description

string
filter_ip($ip)

Validate the IP address (both ipv4 & ipv6)

string
getSessionClass()

Returns the name of session class associated to the request

createSession()

Creates a session based on client input

setSession(vB_Session $session)

Handles setting adding a newly created session to the request object

$session
createSessionForUser($userid)

Creates a session for a specific user

getTimeNow()

No description

getIpAddress()

No description

getAltIp()

No description

getSessionHost()

No description

getUserAgent()

No description

getReferrer()

No description

string
fetchServerValue(string $name)

Fetches a value from $_SERVER or $_ENV

string
fetchIp()

Fetches the IP address of the current visitor

string
fetchAltIp()

Fetches an alternate IP address of the current visitor, attempting to detect proxies etc.

boolean
isBrowser(string $browser, float $version = 0)

Browser detection system - returns whether or not the visiting browser is the one specified

getCachePageForGuestTime()

No description

getUseEarlyFlush()

No description

getVbUrlScheme()

These are mostly only meaningful for web requests, but we need to keep a consistant interface for requests so provide a trivial default here.

getVbHttpHost()

No description

getVbUrlPath()

No description

getVbUrlQuery()

No description

getVbUrlQueryRaw()

No description

getVbUrlClean()

No description

getVbUrlWebroot()

No description

getVbUrlBasePath()

No description

getScriptPath()

No description

setLanguageid($languageid)

No description

getLanguageid()

No description

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

at line 43
protected __construct()

at line 150
string filter_ip($ip)

Validate the IP address (both ipv4 & ipv6)

Parameters

$ip

Return Value

string

at line 159
string getSessionClass()

Returns the name of session class associated to the request

Return Value

string

at line 167
createSession()

Creates a session based on client input

at line 188
protected setSession(vB_Session $session)

Handles setting adding a newly created session to the request object

Adds the session to the request Sets the session language to the request langauge if we have one Registers the session with the vB class

Parameters

vB_Session $session

at line 210
$session createSessionForUser($userid)

Creates a session for a specific user

Used to create session for a particular user based on the current request information. Useful for creating a session after the user logs in. This will overwrite the current Session in this request class and the vB current session.

Parameters

$userid integer The user to create the session for.

Return Value

$session vB_Session The session created. Not that this will be a subclass of the abstract vB_Session Class

at line 233
getTimeNow()

at line 238
getIpAddress()

at line 243
getAltIp()

at line 248
getSessionHost()

at line 253
getUserAgent()

at line 258
getReferrer()

at line 269
protected string fetchServerValue(string $name)

Fetches a value from $_SERVER or $_ENV

Parameters

string $name

Return Value

string

at line 289
protected string fetchIp()

Fetches the IP address of the current visitor

Return Value

string

at line 316
protected string fetchAltIp()

Fetches an alternate IP address of the current visitor, attempting to detect proxies etc.

Return Value

string

at line 388
boolean isBrowser(string $browser, float $version = 0)

Browser detection system - returns whether or not the visiting browser is the one specified

Parameters

string $browser Browser name (opera, ie, mozilla, firebord, firefox... etc. - see $is array)
float $version Minimum acceptable version for true result (optional)

Return Value

boolean

at line 555
getCachePageForGuestTime()

at line 560
getUseEarlyFlush()

at line 572
getVbUrlScheme()

These are mostly only meaningful for web requests, but we need to keep a consistant interface for requests so provide a trivial default here.

at line 577
getVbHttpHost()

at line 582
getVbUrlPath()

at line 587
getVbUrlQuery()

at line 592
getVbUrlQueryRaw()

at line 597
getVbUrlClean()

at line 602
getVbUrlWebroot()

at line 607
getVbUrlBasePath()

at line 612
getScriptPath()

at line 617
setLanguageid($languageid)

Parameters

$languageid

at line 622
getLanguageid()