vB_Request_WebApi
extends vB_Request_Web
in package
Table of Contents
Constants
- COOKIE_SALT = "OmrGuEyxxgTOo4oXhwI6C6GR47iqYgwwn"
Properties
- $COOKIE_SALT : mixed
Methods
- __construct() : mixed
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- createSession() : mixed
- Creates a session based on client input
- createSessionForUser() : vB_Session
- Creates a session for a specific user
- createSessionNew() : mixed
- Creates a session object and attach it to the request. May reuse an existing session in the database.
- getAltIp() : mixed
- getCachePageForGuestTime() : mixed
- getIpAddress() : mixed
- getLanguageid() : mixed
- getReferrer() : mixed
- getRequestingUrl() : string
- Gets the url of the requesting page.
- getScriptPath() : mixed
- getSessionClass() : string
- Returns the name of session class associated to the request
- getSessionHost() : mixed
- getTimeNow() : int
- 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
- setCookieSalt() : mixed
- Overrides the default cookie salt. Required for vB Cloud.
- setLanguageid() : mixed
Constants
COOKIE_SALT
public
mixed
COOKIE_SALT
= "OmrGuEyxxgTOo4oXhwI6C6GR47iqYgwwn"
Properties
$COOKIE_SALT
public
static mixed
$COOKIE_SALT
= "OmrGuEyxxgTOo4oXhwI6C6GR47iqYgwwn"
Methods
__construct()
public
__construct() : mixed
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__sleep()
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>__unserialize()
public
__unserialize(array<string|int, mixed> $serialized) : void
Parameters
- $serialized : array<string|int, mixed>
__wakeup()
public
__wakeup() : void
createSession()
Creates a session based on client input
public
createSession(mixed ...$args) : mixed
Parameters
- $args : mixed
createSessionForUser()
Creates a session for a specific user
public
createSessionForUser(mixed $userid) : vB_Session
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 : mixed
-
integer The user to create the session for.
Return values
vB_Session —The session created. Not that this will be a subclass of the abstract vB_Session Class
createSessionNew()
Creates a session object and attach it to the request. May reuse an existing session in the database.
public
createSessionNew(string $sessionhash, array<string|int, mixed> $restoreSessionInfo) : mixed
Parameters
- $sessionhash : string
-
-- the token given to the client for session handling. If the client has this token they can use the session.
- $restoreSessionInfo : array<string|int, mixed>
-
-- Information to handle "remember me" logic.
- remembermetoken -- Token value for "remember me". Stored in the "password" cookie for legacy reasons. There are so special values to indicate that we should reauthentic via a method other than the internal vB remember me system.
- userid -- user we are remembering
- fbsr_{appid} (optional) -- Only valid if facebook is enabled, and only used if "remembermetoken" is "facebook".
@return array
-
- sessionhash -- the session hash for the session created. This may be different from the passed sessionhash if that session was expired or otherwise unusable.
-
- remembermetoken -- token for remembering the user. This should only be set if the user requests it (or if the there is already a token present but the token changed). It is possible for this to change and if it does and is not passed back to the client future attempts to "remember" the session (using the old value) will fail.
getAltIp()
public
getAltIp() : mixed
getCachePageForGuestTime()
public
getCachePageForGuestTime() : mixed
getIpAddress()
public
getIpAddress() : mixed
getLanguageid()
public
getLanguageid() : mixed
getReferrer()
public
getReferrer() : mixed
getRequestingUrl()
Gets the url of the requesting page.
public
getRequestingUrl() : string
By default this is the REFERRER url but this can be explicitly set by setting the 'url' parameter in the GET/POST
Return values
stringgetScriptPath()
public
getScriptPath() : mixed
getSessionClass()
Returns the name of session class associated to the request
public
getSessionClass() : string
Return values
stringgetSessionHost()
public
getSessionHost() : mixed
getTimeNow()
public
getTimeNow() : int
Return values
intgetUseEarlyFlush()
public
getUseEarlyFlush() : mixed
getUserAgent()
public
getUserAgent() : mixed
getVbHttpHost()
public
getVbHttpHost() : mixed
getVbUrlBasePath()
public
getVbUrlBasePath() : mixed
getVbUrlClean()
public
getVbUrlClean() : mixed
getVbUrlPath()
public
getVbUrlPath() : mixed
getVbUrlQuery()
public
getVbUrlQuery() : mixed
getVbUrlQueryRaw()
public
getVbUrlQueryRaw() : 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
getVbUrlWebroot()
public
getVbUrlWebroot() : mixed
isBrowser()
Browser detection system - returns whether or not the visiting browser is the one specified
public
isBrowser(mixed $browser[, mixed $version = 0 ]) : bool
Parameters
- $browser : mixed
- $version : mixed = 0
Return values
boolsetCookieSalt()
Overrides the default cookie salt. Required for vB Cloud.
public
static setCookieSalt(string $salt) : mixed
Parameters
- $salt : string
setLanguageid()
public
setLanguageid(mixed $languageid) : mixed
Parameters
- $languageid : mixed