abstract class Api_InterfaceAbstract

Constants

API_COLLAPSED

API_LIGHT

API_TEST

Methods

static 
setTest(bool $on)

Turns on/off the test mode in API

static 
setLight(bool $on = true)

Turns on/off the light mode in API

static 
instance($type = NULL)

No description

__clone()

No description

init()

Initialized method. This method is to prevent nested construct calls. See VBV-1862

callApi($controller, $method, array $arguments = array(), $useNamedParams = false)

No description

relay($file)

No description

createSession($request, $options)

Handles inializing the vB session

Details

at line 36
static setTest(bool $on)

Turns on/off the test mode in API

Parameters

bool $on

at line 45
static setLight(bool $on = true)

Turns on/off the light mode in API

Parameters

bool $on

at line 50
static instance($type = NULL)

Parameters

$type

at line 83
__clone()

at line 91
init()

Initialized method. This method is to prevent nested construct calls. See VBV-1862

at line 106
abstract callApi($controller, $method, array $arguments = array(), $useNamedParams = false)

Parameters

$controller
$method
array $arguments
$useNamedParams

at line 108
relay($file)

Parameters

$file

at line 128
protected createSession($request, $options)

Handles inializing the vB session

This includes checking for a session cookie, checking the "rememberme" cookie and doing the facebook redirect if rememberme is flagged as "facebook" and we fail to initialize the user (there is a chicken and egg problem with inializing a facebook user since we generate an auth token via JS but that won't run until the user loads a page so we need to fake load a page to make FB work when a user initially hits the site). This only occurs for get requests as we will lose post data in this process.

We also handle updating the rememberme and session cookies as needed.

This does not handle things like updating lastvisit. We want to skip this for the "light" session used for some AJAX calls.

Parameters

$request
$options