vB_Request_Api
extends vB_Request
in package
Table of Contents
- $altIp : mixed
- $ipAddress : mixed
- $languageid : mixed
- $referrer : mixed
- $session : vB_Session
- $sessionClass : string
- $timeNow : int
- UNIX timestamp at the creation of request
- $userAgent : mixed
- __construct() : mixed
- __serialize() : mixed
- __sleep() : mixed
- __unserialize() : mixed
- __wakeup() : mixed
- createSession() : mixed
- Creates a session based on client input
- createSessionForUser() : mixed
- Creates a session for a specific user
- getAltIp() : mixed
- getCachePageForGuestTime() : mixed
- getIpAddress() : mixed
- getLanguageid() : mixed
- getReferrer() : mixed
- getScriptPath() : mixed
- getSessionClass() : string
- Returns the name of session class associated to the request
- getSessionHost() : mixed
- getTimeNow() : mixed
- getUseEarlyFlush() : mixed
- getUserAgent() : mixed
- getVbHttpHost() : mixed
- getVbUrlBasePath() : mixed
- getVbUrlClean() : mixed
- getVbUrlPath() : mixed
- getVbUrlQuery() : mixed
- getVbUrlQueryRaw() : mixed
- getVbUrlScheme() : mixed
- These are mostly only meaningful for web requests, but we need to keep a consistant interface for requests so provide a trivial default here.
- getVbUrlWebroot() : mixed
- isBrowser() : bool
- Browser detection system - returns whether or not the visiting browser is the one specified
- setLanguageid() : mixed
- fetchAltIp() : string
- Fetches an alternate IP address of the current visitor, attempting to detect proxies etc.
- fetchIp() : string
- Fetches the IP address of the current visitor
- fetchServerValue() : string
- Fetches a value from $_SERVER or $_ENV
- setSession() : mixed
- Handles setting adding a newly created session to the request object
Properties
$altIp
protected
mixed
$altIp
$ipAddress
protected
mixed
$ipAddress
$languageid
protected
mixed
$languageid
= 0
$referrer
protected
mixed
$referrer
$session
protected
vB_Session
$session
= NULL
$sessionClass
protected
string
$sessionClass
$timeNow
UNIX timestamp at the creation of request
protected
int
$timeNow
$userAgent
protected
mixed
$userAgent
Methods
__construct()
public
__construct() : mixed
Return values
mixed —__serialize()
public
__serialize() : mixed
Return values
mixed —__sleep()
public
__sleep() : mixed
Return values
mixed —__unserialize()
public
__unserialize(mixed $serialized) : mixed
Parameters
- $serialized : mixed
Return values
mixed —__wakeup()
public
__wakeup() : mixed
Return values
mixed —createSession()
Creates a session based on client input
public
createSession() : mixed
Return values
mixed —createSessionForUser()
Creates a session for a specific user
public
createSessionForUser( $userid) : mixed
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
Return values
mixed —getAltIp()
public
getAltIp() : mixed
Return values
mixed —getCachePageForGuestTime()
public
getCachePageForGuestTime() : mixed
Return values
mixed —getIpAddress()
public
getIpAddress() : mixed
Return values
mixed —getLanguageid()
public
getLanguageid() : mixed
Return values
mixed —getReferrer()
public
getReferrer() : mixed
Return values
mixed —getScriptPath()
public
getScriptPath() : mixed
Return values
mixed —getSessionClass()
Returns the name of session class associated to the request
public
getSessionClass() : string
Return values
string —getSessionHost()
public
getSessionHost() : mixed
Return values
mixed —getTimeNow()
public
getTimeNow() : mixed
Return values
mixed —getUseEarlyFlush()
public
getUseEarlyFlush() : mixed
Return values
mixed —getUserAgent()
public
getUserAgent() : mixed
Return values
mixed —getVbHttpHost()
public
getVbHttpHost() : mixed
Return values
mixed —getVbUrlBasePath()
public
getVbUrlBasePath() : mixed
Return values
mixed —getVbUrlClean()
public
getVbUrlClean() : mixed
Return values
mixed —getVbUrlPath()
public
getVbUrlPath() : mixed
Return values
mixed —getVbUrlQuery()
public
getVbUrlQuery() : mixed
Return values
mixed —getVbUrlQueryRaw()
public
getVbUrlQueryRaw() : mixed
Return values
mixed —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.
public
getVbUrlScheme() : mixed
Return values
mixed —getVbUrlWebroot()
public
getVbUrlWebroot() : mixed
Return values
mixed —isBrowser()
Browser detection system - returns whether or not the visiting browser is the one specified
public
isBrowser(mixed $browser, mixed $version) : bool
Parameters
- $browser : mixed
- $version : mixed
Return values
bool —setLanguageid()
public
setLanguageid(mixed $languageid) : mixed
Parameters
- $languageid : mixed
Return values
mixed —fetchAltIp()
Fetches an alternate IP address of the current visitor, attempting to detect proxies etc.
protected
fetchAltIp() : string
Return values
string —fetchIp()
Fetches the IP address of the current visitor
protected
fetchIp() : string
Return values
string —fetchServerValue()
Fetches a value from $_SERVER or $_ENV
protected
fetchServerValue(string $name) : string
Parameters
- $name : string
Return values
string —setSession()
Handles setting adding a newly created session to the request object
protected
setSession(vB_Session $session) : mixed
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
- $session : vB_Session